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 Function Add (
	message As Message
) As Integer

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.

Dim myMessage As New Message()
myMessage.Name = "AddSoapOut"
Dim myMessagePart As New MessagePart()
myMessagePart.Name = "parameters"
myMessagePart.Element = New XmlQualifiedName("AddResponse", _
   myServiceDescription.TargetNamespace)
myMessage.Parts.Add(myMessagePart)
myServiceDescription.Messages.Add(myMessage)

.NET Framework
Available since 1.1
Return to top
Show: