Foley .NET Utilities Class Library

LinkedList.Clone Method (Boolean)

Attempts to make a deep copy of the LinkedList.

[Visual Basic]
Overridable Overloads Public Function Clone( _
   ByVal attemptDeepCopy As Boolean _
) As LinkedList
[C#]
public virtual LinkedList 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

A cloned LinkedList.

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.

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

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