📅  最后修改于: 2022-03-11 14:48:48.238000             🧑  作者: Mango
// Create your object
public class A { int Id { get; set; } A() { } A(int id) { Id = id;} }
public class B { int Id { get; set; } B() { } B(int id) { Id = id;} }
// Construct your lists
List list = new List() { new A( Id = 1 ), new A( Id = 2 ) };
List list1 = new List() { new B( Id = 3 ), new B( Id = 4 ) };
// Then create a linq query and convert the result to a list
List