This documentation is archived and is not being maintained.
MessagePart::Message Property
Visual Studio 2008
Gets the Message of which the MessagePart is a member.
Assembly: System.Web.Services (in System.Web.Services.dll)
The following example demonstrates a use of the Message property.
// Get the message part collection for each message. for ( int i = 0; i < myMessageCollection->Count; ++i ) { Console::WriteLine( "Message : {0}", myMessageCollection[ i ]->Name ); // Get the message part collection. MessagePartCollection^ myMessagePartCollection = myMessageCollection[ i ]->Parts; // Display the part collection. for ( int k = 0; k < myMessagePartCollection->Count; k++ ) { Console::WriteLine( "\t Part Name : {0}", myMessagePartCollection[ k ]->Name ); Console::WriteLine( "\t Message Name : {0}", myMessagePartCollection[ k ]->Message->Name ); } Console::WriteLine( "" ); }
// Get the message part collection for each message.
for (int i =0; i < myMessageCollection->Count; ++i)
{
Console::WriteLine(S"Message : {0}",
myMessageCollection->Item[i]->Name);
// Get the message part collection.
MessagePartCollection* myMessagePartCollection =
myMessageCollection->Item[i]->Parts;
// Display the part collection.
for (int k = 0; k < myMessagePartCollection->Count;k++)
{
Console::WriteLine(S"\t Part Name : {0}",
myMessagePartCollection->Item[k]->Name);
Console::WriteLine(S"\t Message Name : {0}",
myMessagePartCollection->Item[k]->Message->Name);
}
Console::WriteLine(S"");
}
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: