Bagikan melalui


SharedProperty.Value Properti

Definisi

Mendapatkan atau mengatur nilai properti bersama.

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

Nilai Properti

Nilai properti bersama.

Contoh

Contoh kode berikut menunjukkan cara menggunakan Value properti untuk mengambil nilai yang disimpan dalam properti bersama.

// 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

Berlaku untuk