Answers for "iterating through an int array c#"

C#
6

c# loop through array

//iterate the array
for (int i = 0; i < arr.Length; i++)
{
  // loop ...
}
// or
foreach (var element in arr)
{
  // loop ...
}
Posted by: Guest on May-16-2020
1

how to loop over array in c#

int[] numbers = new int[] {66,87,34,23,27,4};
foreach(int x in numbers){
	Console.WriteLine(x);
}
Posted by: Guest on October-30-2021

Code answers related to "iterating through an int array c#"

C# Answers by Framework

Browse Popular Code Answers by Language