PermissionSet.SyncRoot 属性

定义

获取当前集合的根对象。

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

属性值

Object

当前集合的根对象。

实现

示例

下面的代码示例演示如何使用 SyncRoot 属性获取当前集合的根对象。 此代码示例是为 PermissionSet 类提供的一个更大示例的一部分。

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

注解

需要此方法才能支持 ICollection

适用于