Query multidimensional array

  • Selects from multidimensional array and throw result as 1D array.
        var array2D = new int[,]  
            {  
                {1, 2, 3},   
                {4, 5, 6},   
                {7, 8, 9}  
            };
 
        var array1D =
            from int val in array2D 
             select val.ToArray();
programming/csharp/linq/querymultidimensionalarray.txt · Last modified: 2018-06-21 19:48 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0