FaultException<TDetail> Constructor (TDetail)

 

Initializes a new instance of the FaultException<TDetail> class that uses the specified detail object.

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

public:
FaultException(
	TDetail detail
)

Parameters

detail
Type: TDetail

The object used as the SOAP fault detail.

The detail object must be serializable or an exception is thrown when the FaultException<TDetail> is serialized.

The following code example shows how a service uses the FaultException<TDetail> type to throw a managed exception that gets converted into the SOAP fault specified by the FaultContractAttribute.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: