Csharp/C Sharp by API/System.Messaging/Message — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 18:31, 26 мая 2010
Message.Body
<source lang="csharp">
using System; using System.Messaging; class MainClass {
[STAThread] static void Main(string[] args) { MessageQueue txq2 = new MessageQueue( @".\Private$\txq2" ); while ( true ) { Message msgIn = txq2.Receive( MessageQueueTransactionType.Single ); msgIn.Formatter = new XmlMessageFormatter( new String[] { "System.String, mscorlib", } ); System.Console.WriteLine( "Received: {0}", (string)msgIn.Body ); } }
}
</source>