HttpError Constructor (ModelStateDictionary, Boolean)
Initializes a new instance of the HttpError class for modelState.
Namespace: System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Sub New ( _
modelState As ModelStateDictionary, _
includeErrorDetail As Boolean _
)
'Usage
Dim modelState As ModelStateDictionary
Dim includeErrorDetail As Boolean
Dim instance As New HttpError(modelState, _
includeErrorDetail)
public HttpError(
ModelStateDictionary modelState,
bool includeErrorDetail
)
public:
HttpError(
ModelStateDictionary^ modelState,
bool includeErrorDetail
)
new :
modelState:ModelStateDictionary *
includeErrorDetail:bool -> HttpError
public function HttpError(
modelState : ModelStateDictionary,
includeErrorDetail : boolean
)
Parameters
modelState
Type: System.Web.Http.ModelBinding.ModelStateDictionaryThe invalid model state to use for error information.
includeErrorDetail
Type: System.Booleantrue to include exception messages in the error; false otherwise