Traverse each row
for ( int i = 0 ; i < mat . GetLength ( 1 ) ; i ++ ) { List < int > arr = new List < int > ( ) ; for ( int j = 0 ; j < mat . GetLength ( 0 ) ; j ++ ) { arr . Add ( mat [ i , j ] ) ; }