new MessageQueue : MessageQueue « System.Messaging « C# / C Sharp by API






new MessageQueue

  
using System;
using System.Messaging;

class MainClass
{
  [STAThread]
  static void Main(string[] args)
  {
    MessageQueue txq1 = new MessageQueue( @".\Private$\txq1" );

    for ( int i =1; i <= 20; i++ )
    {
      Message msgOut = new Message();
      msgOut.Body = "Message " + i;
      txq1.Send( msgOut, MessageQueueTransactionType.Single );
    }
  }
}

   
    
  








Related examples in the same category

1.MessageQueue.Create(String value)
2.MessageQueue.Exists(String value)
3.MessageQueue.Send