Share via


PermissionSet.SyncRoot Properti

Definisi

Mendapatkan objek akar dari koleksi saat ini.

public:
 virtual property System::Object ^ SyncRoot { System::Object ^ get(); };
public virtual object SyncRoot { get; }
member this.SyncRoot : obj
Public Overridable ReadOnly Property SyncRoot As Object

Nilai Properti

Objek akar dari koleksi saat ini.

Penerapan

Contoh

Contoh kode berikut menunjukkan penggunaan SyncRoot properti untuk mendapatkan objek akar dari koleksi saat ini. Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk PermissionSet kelas .

// Display the value of the SyncRoot property.
Console::WriteLine( "SyncRoot property = {0}", ps1->SyncRoot );
// Display the value of the SyncRoot property.
Console.WriteLine("SyncRoot property = " + ps1.SyncRoot);
' Display the value of the SyncRoot property.
Console.WriteLine("SyncRoot property = " & CType(ps1.SyncRoot, PermissionSet).ToString())

Keterangan

Metode ini diperlukan untuk mendukung ICollection.

Berlaku untuk