語言

SharedProperty.Value 屬性

定義

取得或設定共享財產的價值。

public:
 property System::Object ^ Value { System::Object ^ get(); void set(System::Object ^ value); };
public object Value { get; set; }
member this.Value : obj with get, set
Public Property Value As Object

屬性值

共享財產的價值。

範例

以下程式碼範例說明如何利用該 Value 屬性取得儲存在共享屬性中的值。

// Retrieve the value from shared property, and increment the shared 
// property value.
nextReceiptNumber =  safe_cast<int>(ReceiptNumber->Value);
ReceiptNumber->Value = nextReceiptNumber + 1;
// Retrieve the value from shared property, and increment the shared
// property value.
nextReceiptNumber = (int) ReceiptNumber.Value;
ReceiptNumber.Value = nextReceiptNumber + 1;
' Retrieve the value from shared property, and increment the shared 
' property value.
nextReceiptNumber = Fix(ReceiptNumber.Value)
ReceiptNumber.Value = nextReceiptNumber + 1

適用於