Click or drag to resize

ModelExtensionsDeepCopyT Method

Performs a Deep Copy of an object through serialization.

Read our blog on this topic: Revisiting Deep Copy in C#

Namespace:  Xcalibur.Extensions
Assembly:  Xcalibur.Extensions (in Xcalibur.Extensions.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
public static T DeepCopy<T>(
	this T oSource
)

Parameters

oSource
Type: T
The source object.

Type Parameters

T

Return Value

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).
Examples
C#
1var myNewObject = myObject.DeepCopy();
See Also