Interface IGorgonCloneable<T>
A type safe version of the ICloneable interface.
Namespace: Gorgon.Core
Assembly: Gorgon.Core.dll
Syntax
public interface IGorgonCloneable<out T>
Type Parameters
Name | Description |
---|---|
T | The type to clone. |
Remarks
The .NET framework provides us with a ICloneable interface for objects that can be cloned. However, it returns the cloned object as a object type. This can
introduce boxing issues for value types that implement ICloneable
. This interface will allow us to mitigate the boxing issues by providing a strongly typed cloning interface.
Methods
| Edit this page View SourceClone()
Function to clone an object.
Declaration
T Clone()
Returns
Type | Description |
---|---|
T | The cloned object. |