Attempts to make a deep copy of the HashSet.
[Visual Basic]
Overridable Overloads Public Function Clone( _
ByVal attemptDeepCopy As Boolean _
) As HashSet
true
will attempt to make a deep copy,
if false
it will just return a shallow copy
The newly cloned HashSet.
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.
Exception Type | Condition |
---|---|
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. |
HashSet Class | HashSet Members | Foley.Utilities.Collections Namespace | HashSet.Clone Overload List