Message::Parts Property

 

Gets the collection of the MessagePart objects contained in the Message.

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

public:
property MessagePartCollection^ Parts {
	MessagePartCollection^ get();
}

The following example demonstrates a typical use of the Parts property.

   // Creates a Message with name = messageName having one MessagePart
   // with name = partName.
public:
   static Message^ CreateMessage( String^ messageName, String^ partName, String^ element, String^ targetNamespace )
   {
      Message^ myMessage = gcnew Message;
      myMessage->Name = messageName;
      MessagePart^ myMessagePart = gcnew MessagePart;
      myMessagePart->Name = partName;
      myMessagePart->Element = gcnew XmlQualifiedName( element,targetNamespace );
      myMessage->Parts->Add( myMessagePart );
      return myMessage;
   }

.NET Framework
Available since 1.1
Return to top
Show: