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

適用対象

こちらもご覧ください