Driver program to test above functions .
public static void Main ( ) { int [ ] arr = { 34 , 2 , 10 , - 9 } ; gnomeSort ( arr , arr . Length ) ; Console . Write ( " Sorted ▁ sequence ▁ after ▁ applying ▁ Gnome ▁ sort : ▁ " ) ; for ( int i = 0 ; i < arr . Length ; i ++ ) Console . Write ( arr [ i ] + " ▁ " ) ; } }