LinQ提问!!!
程序代码:
public void Linq14() { 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}; Console.WriteLine("Pairs where a < b:"); foreach (var pair in pairs) { Console.WriteLine("{0} is less than {1}", pair.a, pair.b); } }
——————————————————————
from a in numbersA,
b in numbersB这段代码,程序中报错,是什么原因,或者告诉我下格式那什么!