var query1 = Mystudentities.Student.Select(x=>new { a=x.a, b=x.b, c=x.c }); var query2 = Mystudentities.Engineer.Select(x=>new { a=x.a, b=x.b, c=x.c }); var inter=query1.Intersect(query2); foreach( var x in inter) { a=x.a, b=x.b, c=x.c, d=1, e=2 }
var query1 = Mystudentities.Student.Select(x=>new { a=x.a, b=x.b, c=x.c }); var query2 = Mystudentities.Engineer.Select(x=>new { a=x.a, b=x.b, c=x.c }); var inter=query1.intersect(query2); foreach( var x in inter) { a=x.a, b=x.b, c=x.c, d=1, e=2 }
a = x.a, b = x.b,...
foreach( var x in inter) // this is okay.{ a=x.a; b=x.b; c=x.c; d=1; // might need to use var d = 1; e=2; // might need to use var e = 2;}
var inter=query1.intersect(query2).ToArray();
foreach (var oParam in objList) { Console.WriteLine(oParam.UserID); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)