ThrowIfNotDifferent Method
Definition
ThrowIfNotDifferent(string, string, string, string)
Validates and throws an ArgumentOutOfRangeException if there is no difference between second and first.
public static void ThrowIfNotDifferent(string first, string second, string paramName, string message = null)
Parameters
firststringThe value that specifies valid characters.
secondstringThe value to compare with
first.paramNamestringThe name of the parameter that caused the exception.
messagestringA message that describes the error.
Exceptions
- ArgumentOutOfRangeException
There is no difference between
secondandfirst.