public static bool IsNullOrEmpty(this string s) { return string.IsNullOrEmpty(s); }
public static bool IsNotNullOrEmpty(this string s) { return !string.IsNullOrEmpty(s); }
Usage:
string name = "René Hézser";
if (name.IsNotNullOrEmpty()) Console.WriteLine("The name is " + name);
|
Zuletzt geändert am 03.12.2008 17:58 von René Hézser
|
|