0

Working with Array.IndexOf()

https://code.sololearn.com/cuy7g678n13N/?ref=app I would like to find the index of a int value in a 1d-Array. Searching on Google brought me to array.IndexOf(array, 5) ...this should return the index of the value equal to 5. But it doesn't. What's wrong with Dr.Google? :P

26th Jun 2018, 12:30 AM
Oliver
2 Réponses
+ 4
It must be: Console.WriteLine(Array.IndexOf(array,5));
26th Jun 2018, 12:37 AM
John Wells
John Wells - avatar
+ 1
Thanks a lot Sir, after that short answer it seems legit. My fault. Thanks
26th Jun 2018, 12:40 AM
Oliver