Browse by Tags

Tagged Content List
  • Blog Post: 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 nulls (null StringWrapper references) were...
  • Blog Post: 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 based on a certain criteria. This means we can...
  • Blog Post: 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 been telling you for a while that you should...
  • Blog Post: 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 generic collections that can store any specific...
  • Blog Post: 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. HashSet is an unordered collection containing...
  • Blog Post: 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 size of 100,000, NameValueCollection...
  • Blog Post: 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> APIs like Add, Remove, Clear, and Count...
  • Blog Post: 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 .
  • Blog Post: 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 where Peter Golde describes the project details ...
  • Blog Post: 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 Whidbey. For the sake of illustration, suppose in...
  • Blog Post: 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, not just on one collection. I've recently been...
  • Blog Post: Posted an article about System.Collections.ArrayList performance [Gang Peng]

    http://blogs.msdn.com/bclteam/articles/273454.aspx
  • Blog Post: .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 as seamless as possible. It felt that there...
  • Blog Post: 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 copied to the array? We decided the following: IEnumerable...
  • Blog Post: 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 whether always trimming on collections was the best...
  • Blog Post: New BCL features in Beta1

    [Ahmed AbouTaleb] Here is a list of all the new BCL features that shipped in Visual studio 2005 Beta1 Regular Expressions We added the ability to use character class subtraction to regular expressions. The specification is publicly available here . Compression Support We have added...
  • Blog Post: Adding a generic version of ArrayList [Kit George]

    Recently, Olivier Le Pichon queried whether we were considering adding a generic version of ArrayList to the BCL. The answer simply is 'yes we are!'. If you can get yourself a hold of the PDC bits for Whidbey, then you can check out the System.Collections.Generic.List class, and associated collections...
Page 1 of 1 (17 items)