MessagePart.Message Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the Message of which the MessagePart is a member.
public:
property System::Web::Services::Description::Message ^ Message { System::Web::Services::Description::Message ^ get(); };
public System.Web.Services.Description.Message Message { get; }
member this.Message : System.Web.Services.Description.Message
Public ReadOnly Property Message As Message
Property Value
The message of which the MessagePart is a member.
Examples
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("Message : " + 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 : " +
myMessagePartCollection[k].Name);
Console.WriteLine("\t Message Name : " +
myMessagePartCollection[k].Message.Name);
}
Console.WriteLine("");
}
' Get the message part collection for each message.
Dim i As Integer
For i =0 to myMessageCollection.Count-1
Console.WriteLine("Message : " & myMessageCollection(i).Name)
' Get the message part collection.
Dim myMessagePartCollection As MessagePartCollection = _
myMessageCollection(i).Parts
' Display the part collection.
Dim k As Integer
For k = 0 To myMessagePartCollection.Count - 1
Console.WriteLine(ControlChars.Tab & " Part Name : " & _
myMessagePartCollection(k).Name)
Console.WriteLine(ControlChars.Tab & " Message Name : " & _
myMessagePartCollection(k).Message.Name)
Next k
Console.WriteLine("")
Next
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for