ModelStateDictionary Constructors

Definition

Overloads

ModelStateDictionary()

Initializes a new instance of the ModelStateDictionary class.

ModelStateDictionary(ModelStateDictionary)

Initializes a new instance of the ModelStateDictionary class by using values that are copied from the specified dictionary.

ModelStateDictionary(Int32)

Initializes a new instance of the ModelStateDictionary class.

ModelStateDictionary()

Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs

Initializes a new instance of the ModelStateDictionary class.

C#
public ModelStateDictionary ();

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ModelStateDictionary(ModelStateDictionary)

Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs

Initializes a new instance of the ModelStateDictionary class by using values that are copied from the specified dictionary.

C#
public ModelStateDictionary (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary);

Parameters

dictionary
ModelStateDictionary

The ModelStateDictionary to copy values from.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ModelStateDictionary(Int32)

Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs

Initializes a new instance of the ModelStateDictionary class.

C#
public ModelStateDictionary (int maxAllowedErrors);

Parameters

maxAllowedErrors
Int32

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0