ThrowIfHex Method
Definition
ThrowIfHex(string, string, string)
Validates and throws an ArgumentException if the specified argument is hexadecimal.
public static void ThrowIfHex(string argument, string message = "Specified argument cannot be hexadecimal.", 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
- ArgumentException
argumentcannot be hexadecimal.