/// <summary> /// The clone. /// </summary> /// <param name="obj"> /// The object. /// </param> /// <typeparam name="T"> /// </typeparam> /// <returns> /// The <see cref="T"/>. /// </returns> public static T Clone <T>(this T obj) where T : new() { return(ObjectExtCache <T> .Clone(obj)); }
public static TTo Clone<TFrom, TTo>(this TFrom obj) where TTo : TFrom, new() { return ObjectExtCache<TFrom, TTo>.Convert(obj); }