如何遍历二维数组?
string[,] str = new string[1, 10];
str[0, 0] = HeadTitle1.ToString();
str[0, 1] = HeadTitle2.ToString();
str[0, 2] = HeadTitle3.ToString();
str[0, 3] = HeadTitle4.ToString();
str[0, 4] = HeadTitle5.ToString();
str[0, 5] = HeadTitle6.ToString();
str[0, 6] = HeadTitle7.ToString();
str[0, 7] = HeadTitle8.ToString();
str[0, 8] = HeadTitle9.ToString();
str[0, 9] = HeadTitle10.ToString();
如何遍历?
------解决方案--------------------与不规则数组不同,一个foreach语句就行
foreach(string s in str)
{
//
}