using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
public class MainClass{
public static void Main(string[] args){
Int32[] ArrayA = { 1, 2, 3, 4, 8 };
Int32[] ArrayB = { 1, 3, 5, 7, 8 };
var TwoFroms = from QueryA in ArrayA
from QueryB in ArrayB
where QueryA == QueryB
select new { QueryA, QueryB };
foreach (var OutPair in TwoFroms)
Console.WriteLine(OutPair.QueryA.ToString() + " - " + OutPair.QueryB.ToString());
}
}
|