MessageFault.CreateFault Method (FaultCode, FaultReason)

 

Returns a new MessageFault object that uses the specified FaultCode and FaultReason objects.

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

public static MessageFault CreateFault(
	FaultCode code,
	FaultReason reason
)

Parameters

code
Type: System.ServiceModel.FaultCode

The fault code for the fault message.

reason
Type: System.ServiceModel.FaultReason

The reason for the fault.

Return Value

Type: System.ServiceModel.Channels.MessageFault

A MessageFault object with initial values from the passed in parameters.

.NET Framework
Available since 3.0
Return to top
Show: