ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Replaces NULL with the specified replacement value.
public static string IsNullThen(this string str, string alt) { return str ?? alt ?? string.Empty; }
string example = someString.IsNullThen("AlternateValue");
Author: Takeshi, Fukuda
Submitted on: 16 nov. 2018
Language: C#
Type: System.String
Views: 4306