public static object MakeCopyOf(object x) { if (x is ICloneable) { // Return a deep copy of the object return ((ICloneable)x).Clone(); } else throw new System.NotSupportedException("Object Does Not Implement the ICloneable Interface."); } #endregion