Good usage of extension methods

by Marius Gheorghe 19. June 2008 16:05
string.IsNullOrEmpty(stringInstance)
could be replaced with
stringInstance.IsNullOrEmpty()

by adding the following extension method :
public static bool IsNullOrEmpty(this string text)
{
return string.IsNullOrEmpty(text);
}

Tags:

dotNET

Comments are closed

marius gheorghe

developer, dad, gamer

Contact me

My Resume

Favourite Tools