FaultBindingCollection::Add Method (FaultBinding^)
.NET Framework (current version)
Adds the specified FaultBinding to the end of the FaultBindingCollection.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- bindingOperationFault
-
Type:
System.Web.Services.Description::FaultBinding^
The FaultBinding to add to the collection.
Return Value
Type: System::Int32The zero-based index where the bindingOperationFault parameter has been added.
FaultBindingCollection^ myFaultBindingCollection = myOperationBinding->Faults; FaultBinding^ myFaultBinding = gcnew FaultBinding; myFaultBinding->Name = "ErrorString"; // Associate SOAP fault binding to the fault binding of the operation. myExtensions = myFaultBinding->Extensions; SoapFaultBinding^ mySoapFaultBinding = gcnew SoapFaultBinding; mySoapFaultBinding->Use = SoapBindingUse::Literal; mySoapFaultBinding->Namespace = "http://www.contoso.com/stockquote"; myExtensions->Add( mySoapFaultBinding ); myFaultBindingCollection->Add( myFaultBinding );
.NET Framework
Available since 1.1
Available since 1.1
Show: