MessagePartCollection.Add Method (MessagePart)

 

Adds the specified MessagePart to the end of the MessagePartCollection.

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

public int Add(
	MessagePart messagePart
)

Parameters

messagePart
Type: System.Web.Services.Description.MessagePart

The MessagePart to add to the collection.

Return Value

Type: System.Int32

The zero-based index where the messagePart parameter has been added.

MessagePart myMessagePart = new MessagePart();
myMessagePart.Name = "parameters";
myMessagePart.Element = new 
   XmlQualifiedName("AddResponse",myServiceDescription.TargetNamespace);
myMessage.Parts.Add(myMessagePart);

.NET Framework
Available since 1.1
Return to top
Show: