Driver Code
public static void Main ( string [ ] args ) { int [ ] arr = new int [ ] { 5 , 6 , 7 , 8 , 9 , 10 } ; int n , key ; n = arr . Length ; key = 10 ; Console . WriteLine ( " Index : ▁ " + binarySearch ( arr , 0 , n - 1 , key ) ) ; } }