Looping
for
You can return the number of elements in an array by using the Length property
Debug.WriteLine aiArrayIntegers(10).Length;
All arrays are zero based
for (int I = myArray.GetLowerBound(0); I <= myArray.GetUpperBound(0); i++)
{
Debug.WriteLine(aiArrayIntegers(i);
}
for (int I = 0; I <= myArray.Length - 1; i++)
{
Debug.WriteLine(aiArrayIntegers(i);
}
foreach
However, arrays implement the IList interface so you can enumerate it as well:
foreach (string myvalue in myArray)
{
{
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext