Or

public static string Or(this string input, string alternative)
{
    return (string.IsNullOrEmpty(input)==false) ? input : alternative;
}
Example:
string someResult = someString1.Or(someString2).Or("foo");

Description

Returns the first string with a non-empty non-null value.

Details

Double click on the code to select all.

 

;