1.

What Is Collections In C#?

Answer»

Sometimes we NEED to work with related objects for data storage and retrieval. There are two ways to work with related objects. One is array and another one is collections. Arrays are most useful for creating and working with a fixed number of strongly-typed objects. Collections are enhancement of array which provides a more flexible way to work with GROUPS of objects.

The Microsoft .NET framework provides specialized classes for data storage and retrieval. Collections are one of them. Collection is a data STRUCTURE that holds data in different ways. Collections are two types. One is standard collections, which is found under System.Collections namespace and another one is GENERIC collections, which is found under System.Collections.Generic namespace.The generic collections are more flexible and preferable to work with data.

Some commonly used collections under System.Collections namespace are given bellow:

  • ArrayList
  • SortedList
  • HASHTABLE
  • Stack
  • Queue
  • BitArray

Sometimes we need to work with related objects for data storage and retrieval. There are two ways to work with related objects. One is array and another one is collections. Arrays are most useful for creating and working with a fixed number of strongly-typed objects. Collections are enhancement of array which provides a more flexible way to work with groups of objects.

The Microsoft .NET framework provides specialized classes for data storage and retrieval. Collections are one of them. Collection is a data structure that holds data in different ways. Collections are two types. One is standard collections, which is found under System.Collections namespace and another one is generic collections, which is found under System.Collections.Generic namespace.The generic collections are more flexible and preferable to work with data.

Some commonly used collections under System.Collections namespace are given bellow:



Discussion

No Comment Found