ImageMagick.Throw.IfNullOrEmpty C# (CSharp) Метод

IfNullOrEmpty() публичный статический Метод

public static IfNullOrEmpty ( string paramName, [ value ) : void
paramName string
value [
Результат 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);
    }

Same methods

Throw::IfNullOrEmpty ( string paramName, string value, string message ) : void

Usage Example

Пример #1
0
 /// <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;
 }
All Usage Examples Of ImageMagick.Throw::IfNullOrEmpty