Framework Issues
Framework issues are language independent. These are places where the overall design is lacking and causes me great suffering.
Lack of non-default constructors on StringCollection
You can't construct a StringCollection from another StringCollection, an array of strings, etc. The ideal constructor would take an ICollection, cast each item to a string and insert it into the new collection.
Lack of string[] ToArray on StringCollection
You've got a collection of strings in a StringCollection, but you can't find any way to get them out as a string array? Oh wait, there is a way!
string[] arr = ( string[] )new ArrayList( stringcollection ).ToArray( typeof( string ) );
Parsing enumerations
To parse an enumeration, you need to pass the type of the enumeration to a static member of the Enum class. Why they didn't have each enumeration provide their own static Parse method instead is a mystery to me.
MyEnumValue val = Enum.Parse( typeof( MyEnumeration ), "MyEnumValue" );
versus
MyEnumValue val = MyEnumValue.Parse( "MyEnumValue" );
Convert.ChangeType can't do enumerations
You can convert any type to any other type, unless it involves converting a number to an enumeration. This means that any generic code for setting properties needs to special case enumerations.
MyEnumeration val = Convert.ChangeType( 2, typeof( MyEnumeration ) );
No easy coersion from one array type to another
In .NET, there's no easy way to convert an array of x to an array of y. If you've got an array of objects that you want as an array of integers, you'll need to cast each and every one of the members!
Attributes don't know which type they apply to
The .NET framework doesn't allow any way for an attribute to know which class it applies to. You can get around this by using typeof() in the attribute constructor, but it really should be part of the Attribute base class.
Back to 101 Things I Hate About .NET