Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FaultException::CreateFault Method (MessageFault^, array<Type^>^)

 

Returns a FaultException object from the specified message fault and an array of detail types.

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

public:
static FaultException^ CreateFault(
	MessageFault^ messageFault,
	... array<Type^>^ faultDetailTypes
)

Parameters

messageFault
Type: System.ServiceModel.Channels::MessageFault^

The message fault that contains default SOAP fault information.

faultDetailTypes
Type: array<System::Type^>^

An array of types that contains fault details.

Return Value

Type: System.ServiceModel::FaultException^

A FaultException object that you can throw to indicate that a SOAP fault message was received.

The faultDetailTypes parameter contains candidate detail types. If any of the faultDetailTypes has a schema that matches the messageFault parameter, a System.ServiceModel::FaultException<TDetail> is returned where the type parameter is the matching candidate type.

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:
© 2017 Microsoft