System.Web.SiteMapNodeCollection.SyncRoot Property

Gets an object that can be used to synchronize access to the collection.

Syntax

public virtual object SyncRoot { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Enumerating through a System.Web.SiteMapNodeCollection collection is intrinsically not a thread safe procedure. Even when a System.Web.SiteMapNodeCollection is synchronized, other threads can still modify the System.Web.SiteMapNodeCollection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the System.Web.SiteMapNodeCollection during the entire enumeration or catch the exceptions resulting from changes that are made by other threads.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0