Add Null/Empty String Check for Objects

By Michael Flanakin @ 11:08 AM :: 181 Views :: 0 Comments :: (Open), .NET, (Unreported) :: Digg it!
Ok, this may sound like an odd request, but I want the ability to use String.IsNullOrEmpty() on objects. Why, you ask? Whenever dealing with some object which must remain generic, like a DataReader, for instance, the class typically returns objects. It would be nice to be able to use String.IsNullOrEmpty() directly on the object without having to cast it -- leave that to the method itself. I'm thinking of something like this: String.IsNullOrEmpty(myObject). Pretty simple.

Ratings

Comments

Currently, there are no comments. Be the first to post one!
Click here to post a comment



Archives Archives

Categories Categories

Related Links Related Links