ExtensionMethod.NET Home of 819 C#, Visual Basic, F# and Javascript extension methods

IsNullOrEmpty

This extension increase the readability of your code.

Source

public static bool IsNullOrEmpty(this String source){
   
   return String.IsNullOrEmpty(source);

}

Example

var myReallyNiceString = GetThisStringFromACoolMethod();

if(myReallyNiceString.IsNullOrEmpty()){
   DoSomeThingFancyStuff();
}

Author: Jan Fellien

Submitted on: 28 feb 2014

Language: C#

Type: System.String

Views: 3595