Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » System.Collections   (RSS)

The Compare Contract [Kim Hamilton]

A breaking change? We recently heard from a customer who observed different sorting behavior in .NET FX 3.5 SP1 compared to 3.5 RTM. The different behavior was demonstrated with the following code. The class StringWrapper provided a custom sort in which

BCL Refresher: List<T> Predicates [Inbar Gazit]

This time I’m going to focus on one class in this blog post. System.Collections.Generic.List<T> contains some special methods that exist on this type. Those methods take a System.Predicate which is essentially a delegate that allows us to filter

Non-Generic Collections to be Removed from Silverlight [Inbar Gazit]

Those of you who are already using Silverlight 1.1 Alpha may have seen that the familiar non-generic collections were all marked as obsolete. This includes almost everything under the System.Collections namespace. You shouldn’t be too surprised. We’ve

BCL Refresher: Converting the Non-Generic Collections [Inbar Gazit]

As you know generics were only introduced to the .NET Framework in version 2.0. Originally we had a lot of collections in the System.Collections namespace that can store objects. In version 2.0 we added the System.Collections.Generic namespace to support

Introducing HashSet<T> [Kim Hamilton]

HashSet<T> is in our latest CTP, and you can find it in the System.Collections.Generic namespace. The naming discussion over the last month has motivated me to recap some naming highlights for HashSet, so hang in til the end if you’re interested.

Why are NameValueCollection lookups slower than Hashtable? [Kim Hamilton]

An internal discussion came up recently on the performance difference of lookups in Hashtable versus NameValueCollection. Benchmarks revealed that NVC lookups were ~2-8 times slower than Hashtable. For example, when doing 40,000 lookups on a collection
Posted by BCLTeam | 7 Comments
Filed under:

Set Collection [Ryan Byington]

So the BCL thinking of implementing a set collection for a future release and we would like to get you our blog reading public opinion on what scenarios are important to you for a Set collection. The collection will likely have the standard ICollection<T>
Posted by BCLTeam | 17 Comments
Filed under:

Why System.Collections.ObjectModel namespace? [Krzysztof Cwalina]

Many people ask about why Collection, ReadOnlyCollection, and KeyedCollection were moved to System.Collections.ObjectModel namespace. You can read the reasoning here .
Posted by BCLTeam | 2 Comments

PowerCollections MSDN TV Broadcast [Krzysztof Cwalina]

Have you heard about PowerCollections ? It’s an extension library to the new generic collection classes in the System.Collections.Generic namespace. It contains many advanced collections and a ton of algorithms. You can also watch an MSDN TV broadcast
Posted by BCLTeam | 4 Comments

Avoiding Boxing in Classes Implementing Generic Interfaces through Reflection [Dave Fetterman]

Krzysztof Cwalina showed me this cool trick to avoid boxing value types when working with generics and interfaces. This may be a bit dense but the trick is rarely seen and illustrative. Note before proceeding: This technique is only available in VS.NET

Synchronization in Generic Collections [Brian Grunkemeyer]

A few astute users of our generic collections observed that we no longer provide a public SyncRoot property on ICollection<T>. I believe we're better off not providing it. You often want to do synchronization at some higher level in your application,

Posted an article about System.Collections.ArrayList performance [Gang Peng]

http://blogs.msdn.com/bclteam/articles/273454.aspx
Posted by BCLTeam | 4 Comments
Filed under:

.NET Arrays, IList<T>, Generic Algorithms, and what about STL? [Brian Grunkemeyer]

When we were designing our generic collections classes, one of the things that bothered me was how to write a generic algorithm that would work on both arrays and collections. To drive generic programming, of course we must make arrays and generic collections

KeyValuePair vs. DictionaryEntry [Krzysztof Cwalina]

We discussed a problem with implementation of IEnumerable on Dictionary<K,V>. What type should IEnumerable.GetEnumerator().Current return? KeyValuePair<K,V> or DictionaryEntry? Same for ICollection.CopyTo. Instances of what type should be

Notes from a design meeting [Kit George]

All, we're going to start publishing topics from our design meeting notes. Feel free to send general feedback on the item,or to me directly ( kitg@microsoft.com ). Here's a kick off on Collections: TrimToSize on collections . The basic issue here was
More Posts Next page »
 
Page view tracker