This documentation is archived and is not being maintained.

ConditionalWeakTable<TKey, TValue> Constructor

Initializes a new instance of the ConditionalWeakTable<TKey, TValue> class.

Namespace:  System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)

public ConditionalWeakTable()

The ConditionalWeakTable<TKey, TValue> constructor instantiates an empty ConditionalWeakTable<TKey, TValue> table; that is, the table contains no key/value pairs. You can add key/value pairs by calling the Add, GetValue, or GetOrCreateValue method.

Every key in a ConditionalWeakTable<TKey, TValue> object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the Object.ReferenceEquals method returns true).

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.