Click or drag to resize

CopyContextCloneT 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: 24.1.418.0 (24.1.418.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