I have two datatables like this:
dt1:
ID1
----------
1
2
3
4
5
6
7
8
9
10
dt2:
ID2
----------
1
2
3
4
5
Now, I want to retrieve all combinations of the items from these two datatables such that the result will contain 50 (10 x 5) rows – something like this:
dtResult:
ID1 ID2
------------
1 1
1 2
1 3
1 4
1 5
2 1
2 2
2 3
2 4
2 5
3 1
. .
. .
. .
is there any simple way instead of using a loop?
Thanks all but i have solved it by Foreach method in LINQ.