On Mon, Oct 31, 2011 at 10:10 AM, Dotan Cohen <[email protected]> wrote: > On Mon, Oct 31, 2011 at 18:29, Abe Gillespie <[email protected]> wrote: >> Would you please include the compiler output? That will help. >> >> Thanks. >> -Abe >> > > Thank you Abe. > > ✈saturn:cliMono$ cat listTest.cs > using System; > using System.Linq; > > namespace scratchpad { > class MainClass { > public static void Main (string[] args) { > List<int> list = new List<int>{ 2, 7, 1, 3, 9 }; > > var result = from i in list > where i > 1 > select i; > > } > } > } > ✈saturn:cliMono$ mcs listTest.cs > listTest.cs(7,25): error CS0246: The type or namespace name `List' > could not be found. Are you missing a using directive or an assembly > reference? > listTest.cs(9,48): error CS0841: A local variable `list' cannot be > used before it is declared > listTest.cs(9,25): error CS0825: The contextual keyword `var' may only > appear within a local variable declaration > Compilation failed: 3 error(s), 0 warnings > ✈saturn:cliMono$ > > > -- > Dotan Cohen >
You are missing a using for System.Collections.Generic in which List<T> is defined. slide _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
