Table of Contents

Interface ISwiftCloneable<T>

Namespace
SwiftCollections
Assembly
SwiftCollections.dll

Defines a method that copies all elements from the current instance to a specified collection, replacing its contents with an exact clone of the source.

public interface ISwiftCloneable<T>

Type Parameters

T

The type of elements contained in the collection to be cloned.

Remarks

Implementations should ensure that the target collection is cleared before copying elements, so that its contents match the source exactly. The cloning operation may depend on the semantics of the element type T; if T is a reference type, the method may perform a shallow or deep copy depending on the implementation.

Methods

CloneTo(ICollection<T>)

Clones the entire ISwiftCloneable<T> into a new target ICollection<T>, ensuring that the target list is an exact copy. Clears the target list first to match the structure and state of the source list exactly.

void CloneTo(ICollection<T> output)

Parameters

output ICollection<T>