When trying to figure out if a string is null or empty, I usually have the string already. That's why I would have expected a utility function such as String.IsNullOrEmpty() to work without parameters:
String myString;
bool test=myString.IsNullOrEmpty();
However, this does not work, because IsNullOrEmpty expects a String parameter. Instead, I have to write:
String myString;
bool test=String.IsNullOrEmpty(myString);
Why is this so? It seems unnecessarily clunky. Of course I can easily write own extension method for this, but it seems like a very obvious omission, so I am wondering if there is any good reason for this. I can't believe that the parameterless overload of this function has just been forgotten by Microsoft.