WebFaultException<T> Constructor (T, HttpStatusCode, IEnumerable<Type>)

.NET Framework (current version)
 

Initializes a new instance of the WebFaultException<T> class with the specified exception detail and the StatusCode to return to the caller.

Namespace:   System.ServiceModel.Web
Assembly:  System.ServiceModel.Web (in System.ServiceModel.Web.dll)

public WebFaultException(
	T detail,
	HttpStatusCode statusCode,
	IEnumerable<Type> knownTypes
)

Parameters

detail
Type: T

The fault.

statusCode
Type: System.Net.HttpStatusCode

The HTTP status code to set on the response message.

knownTypes
Type: System.Collections.Generic.IEnumerable<Type>

The set of known types that are used for serialization and deserialization.

.NET Framework
Available since 4.0
Return to top
Show: