public static IfNullOrEmpty ( string paramName, [ value ) : void | ||
paramName | string | |
value | [ | |
return | void |
public static void IfNullOrEmpty(string paramName, [ValidatedNotNull] string value)
{
IfNull(paramName, value);
if (value.Length == 0)
throw new ArgumentException("Value cannot be empty.", paramName);
}
Throw::IfNullOrEmpty ( string paramName, string value, string message ) : void |
/// <summary> /// Initializes a new instance of the <see cref="ImageProfile"/> class. /// </summary> /// <param name="name">The name of the profile.</param> protected ImageProfile(string name) { Throw.IfNullOrEmpty(nameof(name), name); Name = name; }