AssertionException Class

Represents an assertion failure.

public sealed class AssertionException : Exception
Inheritance
Exception AssertionException

Constructors

NameDescription
AssertionException()Initializes a new instance of the AssertionException class.
AssertionException(string?)Initializes a new instance of the AssertionException class with a specified error message.
AssertionException(string?, Exception?)Initializes a new instance of the AssertionException class with a specified error message and inner exception.

AssertionException overloads

AssertionException()

AssertionException.cs

Initializes a new instance of the AssertionException class.

public AssertionException()

AssertionException(string?)

AssertionException.cs

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

public AssertionException(string? message)
Parameters
message string?
The message that describes the error.

AssertionException(string?, Exception?)

AssertionException.cs

Initializes a new instance of the AssertionException class with a specified error message and inner exception.

public AssertionException(string? message, Exception? innerException)
Parameters
message string?
The message that describes the error.
innerException Exception?
The exception that is the cause of the current exception.