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
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET