BlockReentrancy Method

ObservableCollection<T>.BlockReentrancy Method ()

 

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:

using (BlockReentrancy())
{
    // OnCollectionChanged call
}

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft