Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread marek safar
Hello, Mono compiler does support extension methods but our implementation has not been extensively tested yet and we definitely welcome any bug reports. > It's a bit more complicated than that, check my updated source: > http://ijbema.home.fmf.nl/Bla.cs > > the solution you give works, but also

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread Antonello Provenzano
That was a bug I sent to Marek some weeks ago, but it seemed to me the problem was just for the extension methods defined inside the assembly: I was working on System.Core and some internal extension methods couldn't be found by the compiler, so we thought it was just that the compiler was not able

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread Mark IJbema
It's a bit more complicated than that, check my updated source: http://ijbema.home.fmf.nl/Bla.cs the solution you give works, but also, if i add the extension method in my own files i can call it as an extension method. So, as far as i can see it is a bug, i filed it as well: http://bugzilla.ximia

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread Alejandro Serrano
The C# compiler does not support extension methods yet. So you must call the methods directly from the Queryable class, something like: using System; using System.Linq; using System.Collections.Generic; public class Bla { public static void Main() { List first = new List(new int

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread marek safar
Hello Mark, > > I'm trying to use the System.Linq library, but i don't know how. It's in > System.Core, so i used: > > gmcs -langversion:linq -r:System.Core Bla.cs > gmcs -langversion:linq -r:/home/mark/local/lib/mono/2.0/System.Core.dll Bla.cs Yes, that's right syntax for code which uses C# 3

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread Antonello Provenzano
Atsushi, Thank you for the explanation: I've never tried using those references outside the mcs compiling context (I'm writing a System.Data.Linq.Design and I needed both, but I was int the project context), so I didn't know it wasn't a non-needed definition outside. Cheers. Antonello On 4/6/07

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread Atsushi Eno
I don't think this issue is about how to build System.Core.dll itself. It does not apply to *users* of the linq libraries. PROFILE=net_2_0 is only about how to build assemblies in mcs, so that's really irrelevant once you built and installe mono and mcs successfully. (If the build and install were

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread Antonello Provenzano
Atsushi, > No, you don't have to add something special either in the source or in the > compiler options. The command line should be fine (even -r might not > be required). Personally when I try to build some library referencing System.Core or System.Data.Linq I have to define the profile 2.0 (PR

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread Atsushi Eno
No, you don't have to add something special either in the source or in the compiler options. The command line should be fine (even -r might not be required). Make sure that the method you are going to use is already implemented. I believe that we don't need extraneous 3.0 build loop until we are

Re: [Mono-dev] Using the System.Linq library

2007-04-06 Thread Antonello Provenzano
Mark, LINQ functions are under the profile 2.0 (I don't know why still don't have 3.0): to compile it you just have to add the PROFILE=net_2_0 directive to the compilation. Cheers. Antonello On 4/3/07, Mark IJbema <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to use the System.Linq library, b

[Mono-dev] Using the System.Linq library

2007-04-05 Thread Mark IJbema
Hi, I'm trying to use the System.Linq library, but i don't know how. It's in System.Core, so i used: gmcs -langversion:linq -r:System.Core Bla.cs gmcs -langversion:linq -r:/home/mark/local/lib/mono/2.0/System.Core.dll Bla.cs On the file: http://ijbema.home.fmf.nl/Bla.cs Can anyone tell me how