Some useful classes in .NET  
Author Message
Poma





PostPosted: .NET Base Class Library, Some useful classes in .NET Top

I have ideas about some useful classes to be created in future versions of .NET. I don't know where to post it so I post it here. Here they are:

1) Generic hashtable (it's useful when you have objects of one type in it, it helps to avoid many typecasts)

2) Array with arbitary intexes(including negative)

3) Math.Max(params ...) - Max function for many variables (int. arrays of variables)




.NET Development13  
 
 
Mike Danes





PostPosted: .NET Base Class Library, Some useful classes in .NET Top

1) already exists. It's the Dictionary<K,V> class from the System.Collections.Generic namespace:

http://msdn2.microsoft.com/en-us/library/xfhwa508.aspx

2) this is somehow supported by using Array.CreateInstance method but since it's not supported by C# it's not very useful. However I doubt that C# will ever add support for this.


 
 
RizwanSharp





PostPosted: .NET Base Class Library, Some useful classes in .NET Top

There is not GenericHashtable like thing but a Dictionary class which is used to store objects of same type with a unique ID, the other Generic Colleciton is List<T> in contrast to Dictionary there is not Unique key used in this collection type.

The Above classes are Present in .Net 2.0 not the previous version!

Best Regards,