using System;
using System.Linq;
public class Program
{
public static void Main()
var numbers = new [] {
1,3,4,5,6,4,5,6,8
};
var level = 5;
var highest = numbers
.Select((x,i) => new { i, matches = x == level })
.Where(x => x.matches)
.Max(x => (int?)x.i);
if (highest.HasValue) {
var index = Math.Min(highest.Value + 1, numbers.Count() - 1);
var next = numbers[index];
Console.WriteLine($"index : {highest}, next {next}");
} else {
Console.WriteLine("nada");
}