Message.FindPartsByName Method (String())
.NET Framework (current version)
Searches the MessagePartCollection returned by the Parts property and returns an array of type MessagePart that contains the named instances.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- partNames
-
Type:
System.String()
An array of names of the MessagePart instances to be returned.
| Exception | Condition |
|---|---|
| ArgumentException | No MessagePart instances with the specified names exist within the collection. |
The following example demonstrates the use of the FindPartsByName method.
' Get message from ServiceDescription. Dim myMessage1 As Message = myServiceDescription.Messages("AddHttpPostIn") Console.WriteLine("ServiceDescription :" + _ myMessage1.ServiceDescription.ToString()) Dim myParts(1) As String myParts(0) = "a" myParts(1) = "b" Dim myMessageParts As MessagePart() = myMessage1.FindPartsByName(myParts) Console.WriteLine("Results of FindPartsByName operation:") Dim i As Integer For i = 0 To myMessageParts.Length - 1 Console.WriteLine("Part Name: " + myMessageParts(i).Name) Console.WriteLine("Part Type: " + myMessageParts(i).Type.ToString()) Next i
.NET Framework
Available since 1.1
Available since 1.1
Show: