MessageQueue.Send : MessageQueue « System.Messaging « VB.Net by API






MessageQueue.Send

   
Imports System
Imports System.Messaging

Public Class MainClass
    
    Shared Sub Main()
      Dim Greeting As String = "Hello World!"
      Dim mQ As MessageQueue
      If MessageQueue.Exists(".\Private$\HelloWorld") Then
         mQ = New MessageQueue(".\Private$\HelloWorld")
      Else
         mQ = MessageQueue.Create(".\Private$\HelloWorld")
      End If

      mQ.Send(Greeting, "HelloWorld")
      Console.WriteLine("Greeting Message Sent to Private Queue.")
    End Sub
End Class

   
    
    
  








Related examples in the same category

1.New MessageQueue
2.MessageQueue.Create
3.MessageQueue.Exists
4.MessageQueue.Receive