Bug 14632 - mono Array.FindLastIndex is not equal to .NET Array.FindLastIndex
Summary: mono Array.FindLastIndex is not equal to .NET Array.FindLastIndex
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2013-09-11 03:21 UTC by Kirill
Modified: 2013-09-13 08:52 UTC (History)
3 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Kirill 2013-09-11 03:21:59 UTC
Hello! I found difference in behavior of function Array.FindLastIndex

.Net code looking for item from startIndex to 0
mono code looking for item from last index to startIndex
Comment 1 Rodrigo Kumpera 2013-09-12 10:32:31 UTC
Please provide a test case that shows this behavior difference.

Why does it even matter as it looks like mono is doing the right thing.
Comment 2 Kirill 2013-09-13 03:32:32 UTC
test code:

public static void TestFindLastIndex() {
    int[] ii = new int[] {1, 0, 0};
    int r = Array.FindLastIndex(ii, 1, x => x != 0);
    Console.WriteLine("index: {0}", r);

public static void Main(string[] args) {

mono: index: -1
.net: index: 0
Comment 3 Marek Safar 2013-09-13 08:52:59 UTC
Fixed in master

Note You need to log in before you can comment on or make changes to this bug.