OperationFaultCollection::Add Method (OperationFault^)

 

Adds the specified OperationFault to the end of the OperationFaultCollection.

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
int Add(
	OperationFault^ operationFaultMessage
)

Parameters

operationFaultMessage
Type: System.Web.Services.Description::OperationFault^

The OperationFault to add to the collection.

Return Value

Type: System::Int32

The zero-based index where the operationFaultMessage parameter has been added.

OperationFaultCollection^ myOperationFaultCollection = myOperation->Faults;
OperationFault^ myOperationFault = gcnew OperationFault;
myOperationFault->Name = "ErrorString";
myOperationFault->Message = gcnew XmlQualifiedName( "s0:GetTradePriceStringFault" );
myOperationFaultCollection->Add( myOperationFault );

.NET Framework
Available since 1.1
Return to top
Show: