FaultContractAttribute Constructor (Type^)

 

Initializes a new instance of the FaultContractAttribute class.

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

public:
FaultContractAttribute(
	Type^ detailType
)

Parameters

detailType
Type: System::Type^

The serializable type that contains error information for the caller.

Exception Condition
ArgumentNullException

The detailType argument is null.

The constructor is typically executed by applying the attribute to a service method and specifying a type as the argument in the attribute.

The following code example shows the use of FaultContractAttribute to specify that the SampleMethod operation can return a SOAP fault with the detail type of GreetingFault.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: