[Mono-bugs] [Bug 462957] New: String. IndexOf returns wrong results when using Culture Comparison

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 30 10:55:59 EST 2008


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


           Summary: String.IndexOf returns wrong results when using Culture
                    Comparison
           Product: Mono: Class Libraries
           Version: 2.0.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: floseflose at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:
When searching an empty string ("") in an empty string while using
System.StringComparison.InvariantCulture or
System.StringComparison.CurrentCulture the result is -1 but it should be 0



Steps to reproduce the problem:
1. Integer a = "".IndexOf("",System.StringComparison.InvariantCulture) 

Actual Results:
a=-1

Expected Results:
a=0 like in .Net

How often does this happen? 
always


-- 
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