using System; class MainClass { public static void Main() { int[] intArray = {5, 2, 3, 1, 6, 9, 7, 14, 25}; Array.Sort(intArray); int index = Array.BinarySearch(intArray, 4); Console.WriteLine("Array.BinarySearch(intArray, 4) = " + index); } }
Array.BinarySearch(intArray, 4) = -4