I'm having trouble getting a LINQ compound select to compile. Here is the code:
int[] numbersA = { 0, 2, 4, 5, 6, 8, 9 };
int[] numbersB = { 1, 3, 5, 7, 8 };
var pairs =
from a in numbersA,
b in numbersB
where a < b
select new {a, b};
The code is from a tutorial from here, under the heading 'SelectMany - Compound from 1':
http://msdn.microsoft.com/en-us/vcsharp/aa336758.aspx#SelectSimple1
And the compile-time error i get is as follows:
A query body must end with a select clause or a group clause
The comma just after 'numbersA' is where the error occurs. Now i can't figure out what i've done wrong, since this is just code as per the MS website. Any help would be great thanks.