ConditionalWeakTable<TKey, TValue> Constructor

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Sub New
[SecuritySafeCriticalAttribute]
public ConditionalWeakTable()

Remarks

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).

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.