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 Joined = from QueryA in ArrayA
join QueryB in ArrayB
on QueryA equals QueryB
select new { QueryA, QueryB };
foreach (var OutPair in Joined)
Console.WriteLine(OutPair.QueryA.ToString() + " - " + OutPair.QueryB.ToString());
}
}
|