IsNullThen

public static string IsNullThen(this string str, string alt)
{
    return str ?? alt ?? string.Empty;
}
Example:
string example = someString.IsNullThen("AlternateValue");

Description

Replaces NULL with the specified replacement value.

Details

Double click on the code to select all.

 

;