猿问
关于IList<T>
能不能把一个IList <T>中的数据放到拷贝到另外一个Ilist <T> ,对象都是一样的
慕少森
浏览 545
回答 2
2回答
翻阅古今
public static void ListCopy(IList<T> src, IList<T> dest) { if (src == null) { throw new System.ArgumentNullException("src", "src is null!"); } if (dest == null) { throw new System.ArgumentNullException("dest", "dest is null!"); } dest.Clear(); foreach (T item in src) { dest.Add(item); } }
0
0
0
眼眸繁星
深拷贝吗?有个简单的方法 IList<string> list1 = new List<string>(); //源listIList<string> list2 = new List<string>(list2); //目的list
0
0
0
随时随地看视频
慕课网APP
相关分类
.NET
.net 中 字符串含有超链接,如何给超链接自动加上a标签?
1 回答
请问.net 中用jquery传值安全吗?
2 回答
我要回答