Driver Code
public static void Main ( String [ ] args ) { int [ ] array = { 3 , 2 , 1 , 4 , 5 , 2 , 1 , 7 , 8 , 9 } ; List < int > v = new List < int > ( ) ; foreach ( int i in array ) { v . Add ( i ) ; }