SoapMessage.GetInParameterValue Method (Int32)


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

Namespace:   System.Web.Services.Protocols
Assembly:  System.Web.Services (in System.Web.Services.dll)

public object GetInParameterValue(
	int index


Type: System.Int32

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

Return Value

Type: System.Object

An Object representing the parameter at the specified index.

Exception Condition

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. For details see the Remarks section.

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.

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

.NET Framework
Available since 1.1
Return to top