MessagePartCollection.Add(MessagePart) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the specified MessagePart to the end of the MessagePartCollection.
public:
int Add(System::Web::Services::Description::MessagePart ^ messagePart);
public int Add (System.Web.Services.Description.MessagePart messagePart);
member this.Add : System.Web.Services.Description.MessagePart -> int
Public Function Add (messagePart As MessagePart) As Integer
Parameters
- messagePart
- MessagePart
The MessagePart to add to the collection.
Returns
The zero-based index where the messagePart
parameter has been added.
Examples
MessagePart^ myMessagePart = gcnew MessagePart;
myMessagePart->Name = "parameters";
myMessagePart->Element = gcnew XmlQualifiedName( "AddResponse",myServiceDescription->TargetNamespace );
myMessage->Parts->Add( myMessagePart );
MessagePart myMessagePart = new MessagePart();
myMessagePart.Name = "parameters";
myMessagePart.Element = new
XmlQualifiedName("AddResponse",myServiceDescription.TargetNamespace);
myMessage.Parts.Add(myMessagePart);
Dim myMessagePart As New MessagePart()
myMessagePart.Name = "parameters"
myMessagePart.Element = New XmlQualifiedName("AddResponse", _
myServiceDescription.TargetNamespace)
myMessage.Parts.Add(myMessagePart)
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.