static class Extensions
{
public static IList<T> Clone<T>(this IList<T> listToClone) where T: ICloneable
{
return listToClone.Select(item => (T)item.Clone()).ToList();
}
}
How do I clone a generic list in C#?
原文:https://www.cnblogs.com/kevin1988/p/9023294.html