Browse by Tags

All Tags » API Design (RSS)

API Hall of Shame #2 – Useless Exception Messages

ReflectionTypeLoadException takes the cake with this message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. This is one of the most frustrating messages to encounter outside of the debugger...

Moving a type from one assembly to another using TypeForwardedToAttribute

One of the problems that we’re facing today in the Framework, mainly stemming from the red bits/green bits design of .NET 3.5, is that certain ‘core’ types are located in the wrong assemblies. For example, the extremely useful ObservableCollection<T>...

Array, Collection, IEnumerable<T> Usage Guidelines

Please read this first: About Dave’s ‘unofficial’ Framework Design Guidelines . þ DO treat a null reference ( Nothing in Visual Basic and nullptr in C++/CLI) and an empty collection or IEnumerable<T> as equivalent. For example, the following constructor...

"I can't believe Microsoft didn't make [Enter API Name Here] public"

Jeremy Miller takes a dig at the BCL team with his post, I love Ayende (and OSS) : From one of Ayende 's many OSS projects. /// This class actually already exists in the System.Core assembly...as an internal class. /// I can only speculate as to why...
Posted by David Kean | 29 comment(s)

API Hall of Shame #1 - Misleading names

Why does Type.GetMember return an array of members? It's description states: Gets the specified members of the current Type. Here's a hint; if you are going to return multiple things from a method or property, give it a plural name - it just makes...