Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Generics   (RSS)

Generic List enumerator order [Vance Morrison]

“Is the order returned by the List<T> enumerator guaranteed to be the same as looping through with a for loop?” Since foreach is actually defined in terms of looping over the ‘MoveNext’ operation of the enumerator, foreach is guaranteed to be equivalent
Posted by BCLTeam | 1 Comments
Filed under:

No Virtual Members on Generic Collections [Ryan Byington]

A customer asked me why we decided to make the members on our generic collection non virtual when every member on the non generic collections was virtual. I though other might be interested in this so I decided to answer it here. When we shipped the first
Posted by BCLTeam | 5 Comments
Filed under:

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,

Extra! Extra! Generics CLS-compliant in Whidbey! [Peter Drayton]

As you may have already heard, the November CTP of Visual Studio 2005 Standard Edition was posted for MSDN subscribers earlier this month. CTPs are unsupported, pre-release software - and also a great way to get an early look at what's coming down the
Posted by BCLTeam | 29 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

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

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
Posted by BCLTeam | 0 Comments
 
Page view tracker