select a whole row out of a 2d array C#
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();
}
}
Also in C#:
- Title
- convert array to list Unity C#
- Category
- C#
- Title
- c# yield
- Category
- C#
- Title
- in unity i want to destroy a gameobject when it hits the edge of the screen
- Category
- C#
- Title
- how to locate a specific element in a list c#
- Category
- C#
- Title
- c# list tuple
- Category
- C#
- Title
- downlaod file and use C#
- Category
- C#
- Title
- how to raycast unit
- Category
- C#
- Title
- c# fold list
- Category
- C#
- Title
- unity how to see what scen you are in
- Category
- C#
- Title
- isprime c#
- Category
- C#
- Title
- c# download file
- Category
- C#
- Title
- c# make request to rest api
- Category
- C#
- Title
- idbset sqlquery
- Category
- C#
- Title
- How to get number of months between 2 dates c#
- Category
- C#
- Title
- trello
- Category
- C#
- Title
- c# if statement
- Category
- C#
- Title
- check for collision unity c#
- Category
- C#
- Title
- unity accessing 2d pointlight from c# script
- Category
- C#
- Title
- json serialize object capitalization config
- Category
- C#
- Title
- delegate function c#
- Category
- C#
- Title
- resize image c#
- Category
- C#
- Title
- perlin noise unity
- Category
- C#
- Title
- how to change the title of the console in c#
- Category
- C#
- Title
- first person camera controller unity
- Category
- C#
- Title
- how to find the type of a object c#
- Category
- C#
- Title
- unity variable from another script
- Category
- C#
- Title
- c# print
- Category
- C#
- Title
- array syntax c#
- Category
- C#
- Title
- get setter c# model
- Category
- C#
- Title
- c# request run as administrator
- Category
- C#
- Title
- play sound on collision unity c#
- Category
- C#
- Title
- index in foreach c#
- Category
- C#
- Title
- c# how to initialize an array
- Category
- C#
- Title
- unity cast float to int
- Category
- C#
- Title
- unity button interactable
- Category
- C#
- Title
- inheritance c#
- Category
- C#
- Title
- unity pro version free download
- Category
- C#
- Title
- how to insert <input> datatype <td> in asp.net core table
- Category
- C#
- Title
- snippet to create constructor in asp.net c#
- Category
- C#
- Title
- Unity if object doens't exist
- Category
- C#
- Title
- unity scene name get
- Category
- C#
- Title
- mailkit send attachment
- Category
- C#
- Title
- string to guid c#
- Category
- C#
- Title
- C# invoke
- Category
- C#
- Title
- c# type of generic is string
- Category
- C#
- Title
- c# convert dictionary to anonymous object
- Category
- C#
- Title
- unity c# change color of gameobject
- Category
- C#
- Title
- generate a dropdown list from array data using razor .net mvc
- Category
- C#
- Title
- c# get index of item in list
- Category
- C#
- Title
- c sharp check if key in dictionary
- Category
- C#
- Title
- how to convert iformfile to byte array c#
- Category
- C#
- Title
- how to select time and date in datetimepicker in c#
- Category
- C#
- Title
- IEnumerator
- Category
- C#
- Title
- if and c#
- Category
- C#
- Title
- how to pause physics in unity c#
- Category
- C#
- Title
- unity delete all children
- Category
- C#
- Title
- html hidden text
- Category
- C#
- Title
- asp.netcore: develop on win10 run on ubuntu
- Category
- C#
- Title
- c# list remove item based on property duplicate
- Category
- C#
- Title
- c sharp add item to dictionary
- Category
- C#
- Title
- c# region tag
- Category
- C#
- Title
- enums c#
- Category
- C#
- Title
- C# aspnet how to run a migration
- Category
- C#
- Title
- initialise icollection c#
- Category
- C#
- Title
- initialize enum with another enum c#
- Category
- C#
- Title
- c# get executable path
- Category
- C#
- Title
- check if network is available c#
- Category
- C#
- Title
- how to get component in unity c#
- Category
- C#
- Title
- how to get array of children transform
- Category
- C#
- Title
- unity rigidbody constraints
- Category
- C#
- Title
- Microsoft.AspNetCore.Components.Forms.InputSelect`1.TryParseValueFromString(String value, TValue& result, String& validationErrorMessage)
- Category
- C#
- Title
- c# filesystemwatcher double events
- Category
- C#
- Title
- C# colours
- Category
- C#
- Title
- change Backcolor c#
- Category
- C#
- Title
- c# discord bot
- Category
- C#
- Title
- month number to text in c#
- Category
- C#
- Title
- what is the or symbol in C#
- Category
- C#
- Title
- rotatearound unity
- Category
- C#
- Title
- how to reference a child object unity
- Category
- C#
- Title
- convert string array to int C#
- Category
- C#
- Title
- c# main method
- Category
- C#
- Title
- how to move towards an object unity
- Category
- C#
- Title
- c# md5 int
- Category
- C#
- Title
- __dopostback
- Category
- C#
- Title
- uwp roaming data sample
- Category
- C#
- Title
- get enum by index c#
- Category
- C#
- Title
- get type of variable c#
- Category
- C#
- Title
- when do i need to end a sentence with ; in c#
- Category
- C#
- Title
- convert from xls to xlsx C#
- Category
- C#
- Title
- list contains type c#
- Category
- C#
- Title
- windows forms iterate through all controls
- Category
- C#
- Title
- entity framework core
- Category
- C#
- Title
- delay in unity
- Category
- C#
- Title
- toggle unity c#
- Category
- C#
- Title
- how to draw a dot in c#
- Category
- C#
- Title
- wpf binding ancestor codebehind
- Category
- C#
- Title
- remove items from list c# condition
- Category
- C#
- Title
- c# reverse string
- Category
- C#
- Title
- if entity.is Transient() Update Mvc 5 c#
- Category
- C#
- Title
- asking for user input integer c#
- Category
- C#