Click or drag to resize
ExtensionMethodsDeepCloneT Method
Distributed Algorithm Simulator
Makes a new copy of an object without keeping a reference.

Namespace: DistributedAlgorithmSimulator
Assembly: DistributedAlgorithmSimulator (in DistributedAlgorithmSimulator.exe) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static T DeepClone<T>(
	this T a
)

Parameters

a
Type: T
Object to copy

Type Parameters

T
Type of object.

Return Value

Type: T
A 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).
Remarks
The class of the object must be marked as [Serializable] to be able to DeepClone.
See Also