FaultException.CreateFault Method (MessageFault, String, array<Type[])

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Public Shared Function CreateFault ( _
    messageFault As MessageFault, _
    action As String, _
    ParamArray faultDetailTypes As Type() _
) As FaultException
public static FaultException CreateFault(
    MessageFault messageFault,
    string action,
    params Type[] faultDetailTypes
)

Parameters

  • 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.

Remarks

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.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.