Represents the error that occurs when an array with an incorrect number of dimensions is passed to a method.
The following example demonstrates an error that causes a RankException exception.
Error caught: System.RankException: The specified arrays must have the same number of dimensions.
Constructs and initializes a new instance of the RankException class.
This constructor initializes the System.RankException.Message property of the new instance to a system-supplied message that describes the error, such as "The two arrays must have the same number of dimensions." This message takes into account the current system culture.
The System.RankException.InnerException property is initialized to null .
This constructor initializes the System.RankException.Message property of the new instance using message. If message is null , the System.RankException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments. The System.RankException.InnerException property is initialized to null .
This constructor initializes the System.RankException.Message property of the new instance using message, and the System.RankException.InnerException property using innerException. If message is null , the System.RankException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.