MessageQueuePermissionAttribute.Category Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the queue category.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

public string Category { get; set; }

Property Value

Type: System.String

The queue category (Message Queuing type identifier), which allows an application to categorize its queues.

Exception Condition

The value is null.

The following code example gets and sets the value of a message queue permission attribute's Category property.

// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");

// Create a new instance of MessageQueuePermissionAttribute.
MessageQueuePermissionAttribute attribute =
    new MessageQueuePermissionAttribute(

// Set the attribute's Category property value, based on the queue's
// Category property value.
attribute.Category = queue.Category.ToString();

// Display the new value of the attribute's Category property.
Console.WriteLine("attribute.Category: {0}",

.NET Framework
Available since 1.1
Return to top