Answers for "asp.net c# loop through string array"

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
0

c# loop through array

for (int i = 0; i < theData.Length - 2; i+=3) 
    { 

        // use theData[i], theData[i+1], theData[i+2]

    }
Posted by: Guest on November-19-2019

C# Answers by Framework

Browse Popular Code Answers by Language