Foley .NET Utilities Class Library

LinkedSet.Clone Method (Boolean)

Attempts to make a deep copy of the LinkedSet.

[Visual Basic]
Overridable Overloads Public Function Clone( _
   ByVal attemptDeepCopy As Boolean _
) As LinkedSet
[C#]
public virtual LinkedSet Clone(
   bool attemptDeepCopy
);

Parameters

attemptDeepCopy
If true will attempt to make a deep copy, if false it will just return a shallow copy

Return Value

The newly cloned LinkedSet.

Remarks

Attempts to make a deep copy if attemptDeepCopy is true. It will attempt this by checking if an Object is an ICloneable, and then defer the process to its Clone method. At the first Object that is not an ICloneable a SystemException will be thrown.

If a true deep copy is important, please check the API documentation for the elements that are contained in the list to verify how their Clone method is implemented.

Exceptions

Exception TypeCondition
System.SystemException If and Object in the list is not an ICloneable.
System.SystemException At the first Object that is not an ICloneable when attemptDeepCopy is true.

See Also

LinkedSet Class | LinkedSet Members | Foley.Utilities.Collections Namespace | LinkedSet.Clone Overload List