ValidationResult Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the ValidationResult class.
Overloads
ValidationResult(ValidationResult) |
Initializes a new instance of the ValidationResult class by using a ValidationResult object. |
ValidationResult(String) |
Initializes a new instance of the ValidationResult class by using an error message. |
ValidationResult(String, IEnumerable<String>) |
Initializes a new instance of the ValidationResult class by using an error message and a list of members that have validation errors. |
ValidationResult(ValidationResult)
- Source:
- ValidationResult.cs
- Source:
- ValidationResult.cs
- Source:
- ValidationResult.cs
Initializes a new instance of the ValidationResult class by using a ValidationResult object.
protected:
ValidationResult(System::ComponentModel::DataAnnotations::ValidationResult ^ validationResult);
protected ValidationResult (System.ComponentModel.DataAnnotations.ValidationResult validationResult);
new System.ComponentModel.DataAnnotations.ValidationResult : System.ComponentModel.DataAnnotations.ValidationResult -> System.ComponentModel.DataAnnotations.ValidationResult
Protected Sub New (validationResult As ValidationResult)
Parameters
- validationResult
- ValidationResult
The validation result object.
Exceptions
validationResult
is null
.
Remarks
The method creates a copy of an exiting ValidationResult object.
Applies to
ValidationResult(String)
- Source:
- ValidationResult.cs
- Source:
- ValidationResult.cs
- Source:
- ValidationResult.cs
Initializes a new instance of the ValidationResult class by using an error message.
public:
ValidationResult(System::String ^ errorMessage);
public ValidationResult (string errorMessage);
public ValidationResult (string? errorMessage);
new System.ComponentModel.DataAnnotations.ValidationResult : string -> System.ComponentModel.DataAnnotations.ValidationResult
Public Sub New (errorMessage As String)
Parameters
- errorMessage
- String
The error message.
Applies to
ValidationResult(String, IEnumerable<String>)
- Source:
- ValidationResult.cs
- Source:
- ValidationResult.cs
- Source:
- ValidationResult.cs
Initializes a new instance of the ValidationResult class by using an error message and a list of members that have validation errors.
public:
ValidationResult(System::String ^ errorMessage, System::Collections::Generic::IEnumerable<System::String ^> ^ memberNames);
public ValidationResult (string errorMessage, System.Collections.Generic.IEnumerable<string> memberNames);
public ValidationResult (string? errorMessage, System.Collections.Generic.IEnumerable<string>? memberNames);
new System.ComponentModel.DataAnnotations.ValidationResult : string * seq<string> -> System.ComponentModel.DataAnnotations.ValidationResult
Public Sub New (errorMessage As String, memberNames As IEnumerable(Of String))
Parameters
- errorMessage
- String
The error message.
- memberNames
- IEnumerable<String>
The list of member names that have validation errors.