|
Forums » .NET » .NET »
|
What is Collection Class in C#? |
Posted Date: 21 Jun 2012 Posted By:: Sridhar Member Level: Silver Member Rank: 860 Points: 1
Responses:
7
|
Hi, Can you explain me, What is Collection Class in C#?
|
Responses
|
#676544 Author: Anil Kumar Pandey Member Level: Platinum Member Rank: 1 Date: 21/Jun/2012 Rating:  Points: 2 | These are the special classed for Data storage and retrieval. There are multiple type of datatype present under collection class. You can make use of one of them for example
Array List Dictionary hash table etc.
for more details refer
msdn.microsoft.com/en-us/library/ybcx56wz%28v=vs.80%29.aspx
Thanks & Regards Anil Kumar Pandey Microsoft MVP, DNS MVM
| #676545 Author: Prachi Kulkarni Member Level: Gold Member Rank: 25 Date: 21/Jun/2012 Rating:  Points: 3 | Hi, Collection classes are defined as part of the System.Collections or System.Collections.Generic namespace. Collections are data structures that holds data in different ways for flexible operations. There are collection classes in C# like ArrayList, HashTable, LinkedList, Stack, Queue, etc.
Regards, Prachi Kulkarni.
| #676547 Author: Ajatshatru Upadhyay Member Level: Gold Member Rank: 20 Date: 21/Jun/2012 Rating:  Points: 2 | Hi,
Collection class defines all the data type related to data structure like ArrayList, List<> etc. as these data types are different from those of Ints and Strings, in the way that they are dynamic by nature as far as allocation of memory is concerned. For more reading, refer below to MSDN: http://msdn.microsoft.com/en-us/library/ybcx56wz.aspx
Hope it'll help you. Regards Ajatshatru
| #676597 Author: Prasad kulkarni Member Level: Diamond Member Rank: 8 Date: 21/Jun/2012 Rating:  Points: 2 | As the name suggest, collection class is used for storing and retriving multiple variables. These classes provide support for stacks, queues, lists, and hash tables. Arraylist are also member of this class. This class is defined under System.Collections.Generic namespace.
Thanks Koolprasd2003 [DotNetSpider MVM]
| #677087 Author: Siva Prasad Member Level: Gold Member Rank: 60 Date: 24/Jun/2012 Rating:  Points: 4 | What is Collection Class in C#: Ans. Collection Class is a class which is used for data storage and retrieval. LinkedList, List, HashTable, Dictionary, ArrayList are the Collection Classes. These Collection Classes provides type-safety at compile-time.
These Collection Classes are derive from the interfaces ICollection, IComparer, IEnumerable, IList, IDictionary, and IDictionaryEnumerator and their generic equivalents.
These Collection classes are avilable in as part of the System.Collections and System.Collections.Generic namespaces.
using System.Collections; using System.Collections.Generic;
LinkedList<string> ll = new LinkedList<string>(); ArrayList arrLs = new ArrayList(); arrLs.Add(10); arrLs.Add(20); List<string> a = new List<string>(); Hashtable h = new Hashtable(); Dictionary<int, string> d = new Dictionary<int, string>();
| #677102 Author: SonyMadhu Member Level: Gold Member Rank: 45 Date: 24/Jun/2012 Rating:  Points: 2 | Hi,
Collection classes defined in System.Collections or System.Collections.Generic Namespaces. In Collections, way of storing the data in different manners. Different type of Collections are Arrays, Stack, Queue, Lists, Hash Table.
Regards, Madhu Be so hapy wen others look at you,they become hapy too
|
|
| Post Reply |
|
|
|
 | | This thread is locked for new responses. Please post your comments and questions as a separate thread. If required, refer to the URL of this page in your new post. |
|
|
|
|
 Follow us on Twitter: https://twitter.com/dotnetspider
|
|