Confuser.Core/Utils.cs
/// <summary>
///     If the input string is empty, return null; otherwise, return the original input string.
/// </summary>
/// <param name="val">The input string.</param>
/// <returns><c>null</c> if the input string is empty; otherwise, the original input string.</returns>
If the input string is empty, return null; otherwise, return the original input string.
If the input string is empty return null ; otherwise return the original input string .
public static string NullIfEmpty(this string val)
        {
            if (string.IsNullOrEmpty(val))
                return null;
            return val;
        }
public static string NullIfEmpty ( this string val ) { if ( string . IsNullOrEmpty ( val ) ) return null ; return val ; }
If the input string is empty, return null; otherwise, return the original input string.
If the input string is empty return null ; otherwise return the original input string .
None
string
this
val
The input string.
The input string .