ModelError Constructors

Definition

Overloads

ModelError(Exception)

Initializes a new instance of ModelError with the specified exception.

ModelError(String)

Initializes a new instance of ModelError with the specified errorMessage.

ModelError(Exception, String)

Initializes a new instance of ModelError with the specified exception and specified errorMessage.

ModelError(Exception)

Source:
ModelError.cs
Source:
ModelError.cs
Source:
ModelError.cs

Initializes a new instance of ModelError with the specified exception.

public:
 ModelError(Exception ^ exception);
public ModelError (Exception exception);
new Microsoft.AspNetCore.Mvc.ModelBinding.ModelError : Exception -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelError
Public Sub New (exception As Exception)

Parameters

exception
Exception

The Exception.

Applies to

ModelError(String)

Source:
ModelError.cs
Source:
ModelError.cs
Source:
ModelError.cs

Initializes a new instance of ModelError with the specified errorMessage.

public:
 ModelError(System::String ^ errorMessage);
public ModelError (string errorMessage);
public ModelError (string? errorMessage);
new Microsoft.AspNetCore.Mvc.ModelBinding.ModelError : string -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelError
Public Sub New (errorMessage As String)

Parameters

errorMessage
String

The error message.

Applies to

ModelError(Exception, String)

Source:
ModelError.cs
Source:
ModelError.cs
Source:
ModelError.cs

Initializes a new instance of ModelError with the specified exception and specified errorMessage.

public:
 ModelError(Exception ^ exception, System::String ^ errorMessage);
public ModelError (Exception exception, string errorMessage);
public ModelError (Exception exception, string? errorMessage);
new Microsoft.AspNetCore.Mvc.ModelBinding.ModelError : Exception * string -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelError
Public Sub New (exception As Exception, errorMessage As String)

Parameters

exception
Exception

The Exception.

errorMessage
String

The error message.

Applies to