SpriteLibrary

# SpriteDatabase
CloneByXMLSerializing
T
Method

This is an inefficient, but simple function to clone a class. It works by serializing an item to a string, and then deserializing it into a class. The end result is that any value which is publically visible is duplicated, but it is a completely separate class from the original.

Namespace: SpriteLibrary
Assembly: SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.5 (1.0.0.5)
Syntax
C#
Copy

    public static T CloneByXMLSerializing<T>(
    	T ObjectToClone
    )

#### Parameters

ObjectToClone
  Type: T
  The actual object to clone

#### Type Parameters

T
  The type of the item to clone

#### Return Value

Type: T
A duplicate of the original
See Also

#### Reference

SpriteDatabase Class
SpriteLibrary Namespace