共用方式為


ICollection.SyncRoot 屬性

Returns an object that can be used to synchronize access to the ICollection.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Private ReadOnly Property SyncRoot As Object
    Implements ICollection.SyncRoot
    Get
'用途
Dim instance As EventPropertyCollection
Dim value As Object

value = CType(instance, ICollection).SyncRoot
Object ICollection.SyncRoot { get; }
private:
virtual property Object^ SyncRoot {
    Object^ get () sealed = ICollection::SyncRoot::get;
}
private abstract SyncRoot : Object
private override SyncRoot : Object
JScript 支援明確介面實作的使用,但不支援新介面實作的宣告。

屬性值

型別:System. . :: . .Object
Object that can be used to synchronize or lock access to the ICollection.

實作

ICollection. . :: . .SyncRoot

備註

Synchronization is effective only if all threads lock this object before accessing the collection.