Share via


ModelError Class

Represents an error that occurs during model binding.

Inheritance Hierarchy

System.Object
  System.Web.Http.ModelBinding.ModelError

Namespace:  System.Web.Http.ModelBinding
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class ModelError
'Usage
Dim instance As ModelError
[SerializableAttribute]
public class ModelError
[SerializableAttribute]
public ref class ModelError
[<SerializableAttribute>]
type ModelError =  class end
public class ModelError

The ModelError type exposes the following members.

Constructors

  Name Description
Public method ModelError(Exception) Initializes a new instance of the ModelError class by using the specified exception.
Public method ModelError(String) Initializes a new instance of the ModelError class by using the specified error message.
Public method ModelError(Exception, String) Initializes a new instance of the ModelError class by using the specified exception and error message.

Top

Properties

  Name Description
Public property ErrorMessage Gets or sets the error message.
Public property Exception Gets or sets the exception object.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Http.ModelBinding Namespace