SoapMessage.GetInParameterValue(Int32) Method

Definition

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

C#
public object GetInParameterValue(int index);

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 less than 0 or greater than the length of the parameters array.

Accessing this property when in parameters are not available.

Examples

C#
myStreamWriter.WriteLine("The values of the in parameters are:");
myStreamWriter.WriteLine("Value of first in parameter: {0}",
   message.GetInParameterValue(0));
myStreamWriter.WriteLine("Value of second in parameter: {0}",
   message.GetInParameterValue(1));

Remarks

The GetInParameterValue property is only accessible when in parameters are available. ASP.NET throws InvalidOperationException when accessing the GetInParameterValue property if in parameters are not available.

In a SoapClientMessage the in parameters are available in the BeforeSerializeSoapMessageStage. In a SoapServerMessage the in parameters are available in the AfterDeserializeSoapMessageStage.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also