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

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

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