Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

SynchronizedHashtable Class

Synchronized Hashtable that, unlike hashtable created using Synchronized method, synchronizes reads from the underlying hashtable in addition to writes.

For a list of all members of this type, see SynchronizedHashtable Members .


[Visual Basic]
<Serializable> _
<DefaultMember(MemberName:="Item")> _
Public Class SynchronizedHashtable
    Implements IDictionary, ICollection, IEnumerable, ICloneable
public class SynchronizedHashtable : IDictionary, ICollection, IEnumerable, ICloneable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


In addition to synchronizing reads, this implementation also fixes IEnumerator/ICollection issue described at http://msdn.microsoft.com/en-us/netframework/aa570326.aspx (search for SynchronizedHashtable for issue description), by implementing IEnumerator interface explicitly, and returns thread safe enumerator implementations as well.

This class should be used whenever a truly synchronized Hashtable is needed.


Namespace: Spring.Collections

Assembly: Spring.Core (in Spring.Core.dll)

See Also

SynchronizedHashtable Members | Spring.Collections Namespace