ObservableCollection<T>.BlockReentrancy Methode

Definition

Verbietet erneuten Versuch, diese Sammlung zu ändern.

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

Gibt zurück

Ein IDisposable Objekt, das zum Löschen des Objekts verwendet werden kann.

Beispiele

Die typische Verwendung besteht darin, einen Anruf innerhalb eines OnCollectionChangedusing Bereichs umzuschließen, wie im folgenden Beispiel gezeigt:

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

Gilt für:

Weitere Informationen