[Mono-dev] Linq sample?

pablosantosluac pablosantosluac at terra.es
Mon Sep 24 11:34:42 EDT 2007


Well, I guess I'm doing something wrong or using an old mono runtime, 
because the sample is very simple. Does it work for you?

Another question: is Linq performace good?


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);
  }
}




----- Original Message ----- 
From: "Kamil Skalski" <kamil.skalski at gmail.com>
To: "pablosantosluac" <pablosantosluac at terra.es>
Cc: <mono-devel-list at lists.ximian.com>; "Robert Jordan" <robertj at gmx.net>
Sent: Monday, September 24, 2007 5:25 PM
Subject: Re: [Mono-dev] Linq sample?


> 2007/9/24, pablosantosluac <pablosantosluac at terra.es>:
>> Thanks Robert,
>>
>> One more question: now it compiles but I can't run it.
>>
>> I'm using Mono JIT compiler version 1.2.5 (/trunk/ r84774)
>>
>> And I get:
>> Unhandled Exception: System.InvalidProgramException: Invalid IL code in
>> app:Main (): IL_0000: ldc.i4.8
>>
>
> Looks like a bug in compiler or runtime. You should produce a small
> sample triggering this error and post to bugzilla.
>
> -- 
> Kamil Skalski
> http://nazgul.omega.pl 




More information about the Mono-devel-list mailing list