using System;
using System.Messaging;
public class MyNewQueue
{
public static void Main()
{
MessageQueue myQueue = new MessageQueue(".\\myQueue");
if (myQueue.Transactional == true)
{
MessageQueueTransaction myTransaction = new MessageQueueTransaction();
myTransaction.Begin();
myQueue.Send("My Message Data.", myTransaction);
myTransaction.Commit();
}
else
{
myQueue.Send("My Message Data.");
}
}
}
|