ExtensionMethodsDeepCloneT Method |
Distributed Algorithm Simulator
Makes a new copy of an object without keeping a reference.
Namespace: DistributedAlgorithmSimulatorAssembly: DistributedAlgorithmSimulator (in DistributedAlgorithmSimulator.exe) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static T DeepClone<T>(
this T a
)
Parameters
- a
- Type: T
Object to copy
Type Parameters
- T
- Type of object.
Return Value
Type:
TA new copy of an object of type T
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
RemarksThe class of the object must be marked as [Serializable] to be able to DeepClone.
See Also