Condividi tramite


OperationFaultCollection.Add(OperationFault) Metodo

Definizione

Aggiunge l'oggetto OperationFault specificato alla fine di 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

Parametri

operationFaultMessage
OperationFault

Oggetto OperationFault da aggiungere alla raccolta.

Restituisce

Indice in base zero in cui è stato aggiunto il parametro operationFaultMessage.

Esempio

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)

Si applica a