MessagePropertyFilter.DefaultLabelSize Property

 
System_CAPS_noteNote

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

Gets or sets the size, in bytes, of the default label buffer.

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

[MessagingDescriptionAttribute("MsgDefaultLabelSize")]
public int DefaultLabelSize { get; set; }

Property Value

Type: System.Int32

The default label buffer size to create when the message is received. The default is 255 bytes.

Exception Condition
ArgumentException

The assigned value is negative.

The default label size specifies the number of bytes to allocate for the message's label. The Label property of the Message class specifies the label of the message.

The following code example demonstrates the use of the DefaultLabelSize property.

// Set the filter's DefaultLabelSize property to 1024 bytes.
queue.MessageReadPropertyFilter.DefaultLabelSize = 1024;

// Display the new value of the filter's DefaultLabelSize property.
Console.WriteLine("MessageReadPropertyFilter.DefaultLabelSize: {0}",
    queue.MessageReadPropertyFilter.DefaultLabelSize.ToString());

.NET Framework
Available since 1.1
Return to top
Show: