Extension Method.
a Extension Method
public static bool IsNullOrEmpty(this string source)
{
return source == null || source == string.Empty;
}
string Extension Method
var myString = "Hello World";
Assert.AreEqual(myString.IsNullOrEmpty(), false);
, .NET :
public static bool IsNullOrEmpty(string source)
{
return source == null || source == string.Empty;
}
var myString = "Hello World";
Assert.AreEqual(IsNullOrEmpty(myString), false);
- , , .
, , Microsoft .