MessagePropertyFilter.DefaultLabelSize 属性

定义

获取或设置默认标签缓冲区的大小(以字节为单位)。Gets or sets the size, in bytes, of the default label buffer.

public:
 property int DefaultLabelSize { int get(); void set(int value); };
[System.Messaging.MessagingDescription("MsgDefaultLabelSize")]
public int DefaultLabelSize { get; set; }
[<System.Messaging.MessagingDescription("MsgDefaultLabelSize")>]
member this.DefaultLabelSize : int with get, set
Public Property DefaultLabelSize As Integer

属性值

Int32

接收消息时创建的默认标签缓冲区大小。The default label buffer size to create when the message is received. 默认值为255字节。The default is 255 bytes.

属性

例外

分配的值为负。The assigned value is negative.

示例

下面的代码示例演示属性的用法 DefaultLabelSizeThe 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);

// 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());

注解

默认标签大小指定为消息的标签分配的字节数。The default label size specifies the number of bytes to allocate for the message's label. Label类的属性 Message 指定消息的标签。The Label property of the Message class specifies the label of the message.

适用于

另请参阅