Showing posts with label Collections in Dotnet Framework. Show all posts
Showing posts with label Collections in Dotnet Framework. Show all posts

6 June 2011

Collections in Dotnet Framework

Collections in Dotnet Framework

Why Use Collections in dotnet?


-Individual elements serve similar purposes and are of equal importance.
-The number of elements is unknown or is not fixed at compile time.
-You need to support iteration over all elements.
-You need to support sorting of the elements.
-You need to expose the elements from a library where a consumer will expect a collection type.

Collections can vary, depending on how the elements are stored, how they are sorted, how searches are performed, and how comparisons are made. The Queue class and the Queue generic class provide first-in-first-out lists, while the Stack class and the Stack generic class provide last-in-first-out lists. TheSortedList class and the SortedList generic class provide sorted versions of the Hashtable class and the Dictionary generic class. The elements of a Hashtable or a Dictionary are accessible only by the key of the element, but the elements of a SortedList or a KeyedCollection are accessible either by the key or by the index of the element. The indexes in all collections are zero-based, except Array, which allows arrays that are not zero-based.

Consistency level in Azure cosmos db

 Consistency level in Azure cosmos db Azure Cosmos DB offers five well-defined consistency levels to provide developers with the flexibility...