Bewerken

Delen via


SoapMessage.GetOutParameterValue(Int32) Method

Definition

Gets the out parameter passed into the XML Web service method at the specified index.

public:
 System::Object ^ GetOutParameterValue(int index);
public object GetOutParameterValue (int index);
member this.GetOutParameterValue : int -> obj
Public Function GetOutParameterValue (index As Integer) As Object

Parameters

index
Int32

The zero-based index of the parameter in the array of parameters.

Returns

An Object representing the parameter at the specified index.

Exceptions

The index parameter is greater than the length of the parameters array.

Accessing this property when out parameters are not available.

Examples

myStreamWriter->WriteLine( "The values of the out parameter are:" );
myStreamWriter->WriteLine(
   "The value of the out parameter is: {0}", message->GetOutParameterValue( 0 ) );
myStreamWriter.WriteLine("The values of the out parameter are:");
myStreamWriter.WriteLine("The value of the out parameter is: {0}",
   message.GetOutParameterValue(0));
myStreamWriter.WriteLine("The values of the out parameter are:")
myStreamWriter.WriteLine("The value of the out parameter is: {0}", _
   message.GetOutParameterValue(0))

Remarks

If out parameters are not available, ASP.NET throws an InvalidOperationException when accessing the GetOutParameterValue property.

In a SoapClientMessage the out parameters are available in the AfterDeserializeSoapMessageStage. In a SoapServerMessage the out parameters are available in the BeforeSerialize of the SoapMessageStage.

Applies to