In This Article

InvalidGrammarException Class

An exception that is thrown when a grammar is invalid.

public class InvalidGrammarException : Exception
Inheritance:
object Exception object

Constructors

InvalidGrammarException()

Initializes a new instance of the InvalidGrammarException class.

public InvalidGrammarException()

InvalidGrammarException(SerializationInfo, StreamingContext)

Initializes a new instance of the InvalidGrammarException class with serialized data.

protected InvalidGrammarException(SerializationInfo info, StreamingContext context)
Parameter Type Description
info SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

InvalidGrammarException(string)

Initializes a new instance of the InvalidGrammarException class with a specified error message.

public InvalidGrammarException(string message)
Parameter Type Description
message string

The error message that explains the reason for the exception.

InvalidGrammarException(string, Exception)

Initializes a new instance of the InvalidGrammarException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public InvalidGrammarException(string message, Exception innerException)
Parameter Type Description
message string

The error message that explains the reason for the exception.

innerException Exception

The exception that is the cause of the current exception.

Inherited Members