Click or drag to resize

CopyContext.Clone<T> Method

Copies the specified object using the ICloneWithContext interface or the ICloneable interface, with a preference on ICloneWithContext.

Namespace:  AGI.Foundation.Infrastructure
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 25.1.421.0 (25.1.421.0)
Syntax
protected T Clone<T>(
	T oldObject
)
where T : class

Parameters

oldObject
Type: T
The object to clone.

Type Parameters

T
The type of the object to clone.

Return Value

Type: T
The newly-cloned object.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when oldObject is null.
InvalidOperationExceptionThe object does not implement ICloneWithContext or ICloneable.
See Also