MessagePropertyFilter.DefaultLabelSize 屬性

定義

取得或設定預設標籤緩衝區的大小 (以位元組為單位)。

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

接收訊息時要建立的預設標籤緩衝區大小。 預設值為 255 個位元組。

屬性

例外狀況

指定值為負值。

範例

下列程式碼範例示範 屬性的使用 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);
// 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());

備註

預設標籤大小會指定要配置給訊息標籤的位元組數目。 類別 LabelMessage 屬性會指定訊息的標籤。

適用於

另請參閱