c# loop through array
//iterate the array
for (int i = 0; i < arr.Length; i++)
{
// loop ...
}
// or
foreach (var element in arr)
{
// loop ...
}int[] numberArray = { 4, 5, 6, 1, 2, 3, -2, -1, 0 };
foreach (int number in numberArray)
{
System.Console.Write("{0} ", number);
} for (int i = 0; i < theData.Length - 2; i+=3)
{
// use theData[i], theData[i+1], theData[i+2]
}
Also in C#:
- unity rotate vector
- c# list remove item based on property duplicate
- constructor in inherited class c#
- convert word files to plain text c#
- sum the digits in c#
- c sharp tryparse
- c# lambda expression
- c# length of array
- c# making a folder
- get hash c#
- unity get child
- dynamic group by expression C#
- c# ?
- set decimal point c#
- change Backcolor c#
- how to start an if statement in c#
- unity set material color
- c# round to closest multiple
- variables
- asp.net core 3.1: cast jObject to dictionary<string,string>
- make a list c#
- sending email using c#
- how to make a game
- can't add an editor script