ObservableCollection<T>.BlockReentrancy メソッド

定義

このコレクションを変更する再入試行を禁止します。

protected:
 IDisposable ^ BlockReentrancy();
protected IDisposable BlockReentrancy();
member this.BlockReentrancy : unit -> IDisposable
Protected Function BlockReentrancy () As IDisposable

返品

オブジェクトの破棄に使用できる IDisposable オブジェクト。

一般的な使用方法は、次の例のように、using スコープ内でOnCollectionChanged呼び出しをラップすることです。

using (BlockReentrancy())
{
    // OnCollectionChanged call
}
Using BlockReentrancy()
    ' OnCollectionChanged call
End Using

適用対象

こちらもご覧ください