Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

OrderedDictionary<(Of <(<'TKey, TValue>)>)>..::..CloneContents Method

Makes a deep clone of this dictionary. A new dictionary is created with a clone of each entry of this dictionary, by calling ICloneable.Clone on each element. If TKey or TValue is a value type, then each element is copied as if by simple assignment.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public OrderedDictionary<TKey, TValue> CloneContents()
Public Function CloneContents As OrderedDictionary(Of TKey, TValue)
public:
OrderedDictionary<TKey, TValue>^ CloneContents()

Return Value

The cloned dictionary.

Exceptions


ExceptionCondition
InvalidOperationExceptionTKey or TValue is a reference type that does not implement ICloneable.

Remarks


If TKey or TValue is a reference type, it must implement ICloneable. Otherwise, an InvalidOperationException is thrown.

Cloning the dictionary takes time O(N log N), where N is the number of keys in the dictionary.