var userF = new List<User>();
User m1 = new User()
{
Id = "0"
};
userF.Add(m1);
var userUF = new List<User>();
User m2 = new User()
{
Id =
"1"
};
User m3 = new User()
{
Id = "134"
};
userUF.Add(m2);
userUF.Add(m3);
(userF as
List<User>).AddRange(userUF);
过程描述:已userF (1个)为主,将userUF(2个)加到userF 后面
结果userF = 0,1,134
2个 List<T>进行数据合并,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/wdw31210/p/3716129.html