[Mono-bugs] [Bug 637526] Invalid IL code in Enumerable.cs

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Sep 7 10:58:59 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=637526

https://bugzilla.novell.com/show_bug.cgi?id=637526#c2


--- Comment #2 from Jb Evain <jbevain at novell.com> 2010-09-07 14:58:58 UTC ---
Working test-case:

<<<<<
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

static class Repro {

    public static string Strip(this string strA, char target)
    {
        char[] charArr = strA.ToCharArray();
        var targetArr = new List<char>();
        targetArr.AddRange(
                        charArr.Where(
                            character =>
                               
!character.ToString(CultureInfo.InvariantCulture).Equals(
                                   
target.ToString(CultureInfo.InvariantCulture),
                                   
StringComparison.InvariantCultureIgnoreCase)));
            return new string(targetArr.ToArray()); 
    }

    static void Main ()
    {
        Console.WriteLine ("Hello World".Strip ('l'));
    }
}
<<<<<

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list