Driver Code
public static void Main ( string [ ] args ) { int [ ] arr = { 2 , 1 , 4 , 3 , 6 , 5 , 8 , 7 , 10 , 9 } ; List < int > arr1 = new List < int > ( ) ; for ( int i = 0 ; i < arr . Length ; i ++ ) arr1 . Add ( arr [ i ] ) ;