private class MyClass { public int A { get; set; } public int b { get; set; } public int c { get; set; } public int d { get; set; } public int e { get; set; } public int f { get; set; } public int g { get; set; } public int h { get; set; } public int i { get; set; } public int j { get; set; } public int k { get; set; } public int l { get; set; } public int hh { get; set; } }
private class MyClass2 { public int A { get; set; } public int b { get; set; } public int c { get; set; } public int d { get; set; } public int e { get; set; } public int hh { get; set; } }
使用 Linq
1 2 3 4 5 6 7 8 9 10
List<MyClass2> data = my.Select(x => new MyClass2() { A = x.A, b = x.b, c = x.c, d = x.d, e = x.e, hh = x.hh }).ToList();