[Mono-dev] Linq sample?
Kevin Kubasik
kevin at kubasik.net
Mon Sep 24 11:20:31 EDT 2007
As I understand it, we support the query language rewrite, and the
core classes for querying objects in the manner specified in your
last mail. The problem is our compiler doesn't default to all that new
jazz yet, just add -langversion:linq to your compiler options and it
should work.
On 9/23/07, pablosantosluac <pablosantosluac at terra.es> wrote:
> Hi!
>
> I was wondering which is the current Linq status in mono.
>
> I've downloaded and compiled the olive project, and now I have the
> System.Data.Linq assembly but I was wondering how should I write a Linq
> sample in mono.
>
> I didn't find a sample or test in the code to start up with.
>
> I tried this one from msdn, but I guess I'm doing something wrong because I
> wasn't able to compile it.
>
> using System;
> using System.Linq;
> using System.Collections.Generic;
>
> class app {
> static void Main() {
> string[] names = { "Burke", "Connor", "Frank",
> "Everett", "Albert", "George",
> "Harris", "David" };
>
> IEnumerable<string> query = from s in names
> where s.Length == 5
> orderby s
> select s.ToUpper();
>
> foreach (string item in query)
> Console.WriteLine(item);
> }
> }
>
>
> I'm just interested in "in-memory" queries.
>
> Any suggestions?
>
> Thanks,
>
> pablo
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
--
Cheers,
Kevin Kubasik
http://kubasik.net/blog
More information about the Mono-devel-list
mailing list