BlockReentrancy Method

ObservableCollection<T>.BlockReentrancy Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Disallows reentrant attempts to change this collection.

Namespace:  System.Collections.ObjectModel
Assembly:  System (in System.dll)

protected IDisposable BlockReentrancy()

Return Value

Type: System.IDisposable
An IDisposable object that can be used to dispose of the object.

The typical usage is to wrap an OnCollectionChanged call within a using scope, as in the following example:

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft