Bug 24582 - Array.IndexOf throws NullReferenceException if any item in it is null
Summary: Array.IndexOf throws NullReferenceException if any item in it is null
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-11-17 12:09 UTC by Grigory (Playtika)
Modified: 2015-01-23 07:26 UTC (History)
2 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 Grigory (Playtika) 2014-11-17 12:09:35 UTC

System.NullReferenceException: Object reference not set to an instance of an object
at System.Array.InternalArray__IndexOf<object> (object) <0x00088> (code.cs:1)
at (wrapper managed-to-managed) object[].System.Collections.Generic.IList`1.IndexOf (object) <0x00023> (code.cs:1)

Xamarin.Android 4.18
Comment 1 Marek Safar 2014-11-18 05:11:11 UTC
I cannot reproduce the issue with following test case 

			IList<object> o = new object[] { 1, null, "3" };
			o.IndexOf (null);

Please provide self contained repro.
Comment 2 Marek Safar 2015-01-23 07:26:21 UTC
No response