共用方式為


BindingOperations.AccessCollection(IEnumerable, Action, Boolean) 方法

定義

透過應用程式在呼叫 EnableCollectionSynchronization 時指定的同步處理機制,提供對集合的存取。

public:
 static void AccessCollection(System::Collections::IEnumerable ^ collection, Action ^ accessMethod, bool writeAccess);
public static void AccessCollection (System.Collections.IEnumerable collection, Action accessMethod, bool writeAccess);
static member AccessCollection : System.Collections.IEnumerable * Action * bool -> unit
Public Shared Sub AccessCollection (collection As IEnumerable, accessMethod As Action, writeAccess As Boolean)

參數

collection
IEnumerable

要存取的集合。

accessMethod
Action

要對集合執行的動作。

writeAccess
Boolean

如果accessMethod會寫入至集合中,則為 true,否則為 false

適用於