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:
property MessagePart^ default [String^] {
	MessagePart^ get (String^ name);
}
/** @property */
public MessagePart get_Item (String name)

Not applicable.

Parameters

name

The name of the MessagePart returned.

Property Value

A MessagePart.

Message^ myLocalMessage = myServiceDescription->Messages[ "AddHttpPostOut" ];
if ( myMessageCollection->Contains( myLocalMessage ) )
{
   Console::WriteLine( "Message      : {0}", myLocalMessage->Name );

   // Get the message part collection.
   MessagePartCollection^ myMessagePartCollection = myLocalMessage->Parts;
   array<MessagePart^>^myMessagePart = gcnew array<MessagePart^>(myMessagePartCollection->Count);
   
   // Copy the MessagePartCollection to an array.
   myMessagePartCollection->CopyTo( myMessagePart, 0 );
   for ( int k = 0; k < myMessagePart->Length; k++ )
      Console::WriteLine( "\t       Part Name : {0}", myMessagePartCollection[ k ]->Name );
   Console::WriteLine( "" );
}

Message myLocalMessage = myServiceDescription.get_Messages().
    get_Item("AddHttpPostOut");
if (myMessageCollection.Contains(myLocalMessage)) {
    Console.WriteLine("Message      : " + myLocalMessage.get_Name());

    // Get the message part collection.
    MessagePartCollection myMessagePartCollection = 
        myLocalMessage.get_Parts();
    MessagePart myMessagePart[] = 
        new MessagePart[myMessagePartCollection.get_Count()];

    // Copy the MessagePartCollection to an array.
    myMessagePartCollection.CopyTo(myMessagePart, 0);

    for (int k = 0; k < myMessagePart.length; k++) {
        Console.WriteLine("\t       Part Name : " 
            + myMessagePartCollection.get_Item(k).get_Name());
    }
    Console.WriteLine("");
}

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: