Horje
select a whole row out of a 2d array C# Code Example
select a whole row out of a 2d array C#
public class CustomArray<T>
{
    public T[] GetColumn(T[,] matrix, int columnNumber)
    {
        return Enumerable.Range(0, matrix.GetLength(0))
                .Select(x => matrix[x, columnNumber])
                .ToArray();
    }

    public T[] GetRow(T[,] matrix, int rowNumber)
    {
        return Enumerable.Range(0, matrix.GetLength(1))
                .Select(x => matrix[rowNumber, x])
                .ToArray();
    }
}




Csharp

Related
Print arraylist values to console unity Code Example Print arraylist values to console unity Code Example
unity deactivate scripts in list Code Example unity deactivate scripts in list Code Example
Show empty message in data table angular material, If no data found Code Example Show empty message in data table angular material, If no data found Code Example
how to use open hardware monitor in c# Code Example how to use open hardware monitor in c# Code Example
c# reflection get property value array Code Example c# reflection get property value array Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9