System.Messaging Reference (Document! X Sample)
System.Messaging Namespace / MessageQueue Class / Create Method / Create(String,Boolean) Method
The path of the queue to create.
true to create a transactional queue; false to create a non-transactional queue.



In This Topic
    Create(String,Boolean) Method
    In This Topic
    Creates a transactional or non-transactional Message Queuing queue at the specified path.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function Create( _
       ByVal path As String, _
       ByVal transactional As Boolean _
    ) As MessageQueue
    'Usage
     
    
    Dim path As String
    Dim transactional As Boolean
    Dim value As MessageQueue
     
    value = MessageQueue.Create(path, transactional)
    public static MessageQueue Create( 
       string path,
       bool transactional
    )
    public:
    static MessageQueue^ Create( 
       String^ path,
       bool transactional
    ) 

    Parameters

    path
    The path of the queue to create.
    transactional
    true to create a transactional queue; false to create a non-transactional queue.

    Return Value

    A MessageQueue that represents the new queue.
    Exceptions
    ExceptionDescription
    The path parameter is null or is an empty string ("").
    A queue already exists at the specified path.-or- An error occurred when accessing a Message Queuing method.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also