MessageCollection::Add Method (Message^)

 

Adds the specified Message to the end of the MessageCollection.

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

public:
int Add(
	Message^ message
)

Parameters

message
Type: System.Web.Services.Description::Message^

The Message to add to the collection.

Return Value

Type: System::Int32

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

Message^ myMessage = gcnew Message;
myMessage->Name = "AddSoapOut";
MessagePart^ myMessagePart = gcnew MessagePart;
myMessagePart->Name = "parameters";
myMessagePart->Element = gcnew XmlQualifiedName( "AddResponse",myServiceDescription->TargetNamespace );
myMessage->Parts->Add( myMessagePart );
myServiceDescription->Messages->Add( myMessage );

.NET Framework
Available since 1.1
Return to top
Show: