string[] str1 = { };
Console.WriteLine(str1.Length);
string s = "";
int i = 0;
while (i < str1.Length - 1)
{
s = s + str1[i];
i++;
}
s = s + str1[str1.Length-1];
为什么在执行到while (i < str1.Length - 1)时,程序不会出现问题,而在执行最后一行代码 s = s + str1[str1.Length-1];出现问题。