ObservableCollection<T>.BlockReentrancy Método

Definição

Não permite novas tentativas de alteração dessa coleção.

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

Retornos

Um IDisposable objeto que pode ser usado para descartar o objeto.

Exemplos

O uso típico é encapsular uma OnCollectionChanged chamada dentro de um using escopo, como no exemplo a seguir:

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

Aplica-se a

Confira também