How to use IEnumerable, ICollection, IList, and IQueryable in C#
Understand the differences between the most commonly used interfaces for accessing and manipulating collections of data in C#.
Stay updated with breaking news from System Collections. Get real-time updates on events, politics, business, and more. Visit us for reliable news and exclusive interviews.
Understand the differences between the most commonly used interfaces for accessing and manipulating collections of data in C#.
Take advantage of the BitArray class in .NET 7 to perform bitwise operations on your data for improved performance.
| How to use SortedDictionary, SortedList, and SortedSet in C# Take advantage of the SortedDictionary, SortedList, and SortedSet classes in C# to store key-value pairs and sort them based on keys. Thinkstock SortedDictionary, SortedList, and SortedSet are collection classes that store key-value pairs and can be sorted based on the keys. A SortedSet is a collection that is maintained in sorted order. A SortedList is a collection that lets you retrieve the keys and/or values using indexes. A SortedDictionary lacks indexes but offers faster insertion and removal of unsort...
Take advantage of read-only generic interfaces such as IReadOnlyList, IReadOnlyDictionary, and IReadOnlyCollection to prevent modifications to collections in your .NET Core applications.