Non-Generic to Generic types conversion table
Inbar Gazit published a post on "Converting the Non-Generic Collections" in the BCL Team blog.
He had this handy little table:
| Non-generic | Generic replacement |
| ArrayList | List<T> |
| BitArray | List<Boolean> [note that this isn’t stored as compactly as BitArray but represents the same information] |
| CaseInsensitiveComparer | Comparer<T> |
| CaseInsensitiveHashCodeProvider | Comparer<T> |
| CollectionBase | Collection<T> |
| Comparer | Comparer<T> |
| CompatibleComparer | Comparer<T> |
| DictionaryBase | KeyedCollection<K,V> |
| DictionaryEntry | KeyValuePair<K,V> |
| Hashtable | Dictionary<K,V> |
| KeyValuePairs | KeyValuePair<K,V> |
| Queue | Queue<T> |
| ReadOnlyCollectionBase | ReadOnlyCollection<T> |
| SortedList | List<T> |
| Stack | Stack<T> |




No comments:
Post a Comment