ThrowIfNotBinaryDigits Method
Definition
ThrowIfNotBinaryDigits(string, string, string)
Validates and throws an ArgumentOutOfRangeException if the specified argument consist of anything besides binary digits.
public static void ThrowIfNotBinaryDigits(string argument, string message = "Value must consist only of binary digits.", string paramName = null)
Parameters
argumentstringThe value to be evaluated.
messagestringA message that describes the error.
paramNamestringThe name of the parameter that caused the exception.
Exceptions
- ArgumentOutOfRangeException
argumentmust consist only of binary digits.