Answers for "c sharp iterate over array"

C#
12

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
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