MessagePartCollection.Item Property (String)

 

Gets a MessagePart specified by its name.

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

Public ReadOnly Property Item (
	name As String
) As MessagePart

Parameters

name
Type: System.String

The name of the MessagePart returned.

Property Value

Type: System.Web.Services.Description.MessagePart

A MessagePart.

Dim myLocalMessage As Message = _
   myServiceDescription.Messages("AddHttpPostOut")
If myMessageCollection.Contains(myLocalMessage) Then
   Console.WriteLine("Message      : " & myLocalMessage.Name)

   ' Get the message part collection.
   Dim myMessagePartCollection As MessagePartCollection = _
      myLocalMessage.Parts
   Dim myMessagePart(myMessagePartCollection.Count) As MessagePart

   ' Copy the MessagePartCollection to an array.
   myMessagePartCollection.CopyTo(myMessagePart, 0)
   Dim k As Integer
   For k = 0 To myMessagePart.Length - 2
      Console.WriteLine(ControlChars.Tab & "       Part Name : " & _
         myMessagePartCollection(k).Name)
   Next k
   Console.WriteLine("")
End If

.NET Framework
Available since 1.1
Return to top
Show: