Constructs and initializes a new instance of the ArgumentException class.
- message
- A string that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
- paramName
- A string that contains the name of the parameter that caused the exception.
This constructor initializes the ArgumentException.Message property of the new instance using message, and the ArgumentException.ParamName property using paramName. If message is null, the ArgumentException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments. The ArgumentException.InnerException property is initialized to null.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0