Udostępnij za pośrednictwem


OperationFaultCollection.Add(OperationFault) Metoda

Definicja

Dodaje określony OperationFault element na końcu elementu OperationFaultCollection.

public:
 int Add(System::Web::Services::Description::OperationFault ^ operationFaultMessage);
public int Add (System.Web.Services.Description.OperationFault operationFaultMessage);
member this.Add : System.Web.Services.Description.OperationFault -> int
Public Function Add (operationFaultMessage As OperationFault) As Integer

Parametry

operationFaultMessage
OperationFault

Element OperationFault do dodania do kolekcji.

Zwraca

Int32

Indeks oparty na zera, w którym operationFaultMessage został dodany parametr.

Przykłady

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

Dotyczy