不知道结果为啥提示超出索引了
不知道结果为啥提示超出索引了 { string[] p={"关羽","张飞","赵云","马超","黄忠"}; for(int i=0;i<=p.Length;i++) Console.Write(p[i]+",");//请在这里完善代码 } [ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Index was outside the bounds of the array.
不知道结果为啥提示超出索引了 { string[] p={"关羽","张飞","赵云","马超","黄忠"}; for(int i=0;i<=p.Length;i++) Console.Write(p[i]+",");//请在这里完善代码 } [ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Index was outside the bounds of the array.
2017-10-04
举报