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#?
猜你喜欢
转载自www.cnblogs.com/kevin1988/p/9023294.html
今日推荐
周排行