Imports System
Imports System.Messaging
Public Class MyNewQueue
Public Shared Sub Main()
Dim myNewQueue As New MyNewQueue
myNewQueue.SendMessage()
End Sub
Public Sub SendMessage()
Dim myQueue As New MessageQueue(".\myQueue")
If myQueue.Transactional = True Then
Dim myTransaction As New MessageQueueTransaction
myTransaction.Begin()
myQueue.Send("My Message Data.", myTransaction)
myTransaction.Commit()
Else
myQueue.Send("My Message Data.")
End If
Return
End Sub
End Class