How do you loop through a multidimensional array?

后端 未结 7 1360
陌清茗
陌清茗 2021-01-03 19:50
foreach (String s in arrayOfMessages)
{
    System.Console.WriteLine(s);
}

string[,] arrayOfMessages is being passed in as a parameter

相关标签:
7条回答
  • 2021-01-03 20:35

    You can use the code below to run multidimensional arrays.

    foreach (String s in arrayOfMessages)
    {
        System.Console.WriteLine("{0}",s);
    }
    
    0 讨论(0)
提交回复
热议问题