Udostępnij za pośrednictwem


MessagePart.Message Właściwość

Definicja

Pobiera element Message , z którego MessagePart element jest członkiem.

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

Wartość właściwości

Komunikat, którego MessagePart elementem jest element członkowski.

Przykłady

W poniższym przykładzie pokazano użycie Message właściwości .

// 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

Dotyczy