Class.clone Method

Returns a copy of the specified class instance. Class properties containing other class instance types or primitive types will be deep copied whereas properties containing other objects will share references.
 
 
Static This method is static.

Parameters

instance

Type: Class
A class instance to clone.

Return Value


Type: Class
A new object that is a copy of instance.