一段代码行运时出现的问题,大家帮忙看一下,谢谢啊!
using System;
class listArg0
{
public static void Main(String[] args)
{
string strName; //声明一个string类型的值变量
strName = args[0]; //把第一个参数赋给变量strName
Console.WriteLine("This is the first argument: {0}!", strName); //格式化输出第一个参数
}
}
我运行这段代码时出现这个问题是什么意思?
命令题示如下
末处理异常;System.IndexOutOfRangeException;索引超出了数组界限.
at listArg0.Main<string[] args>
大家帮忙说一下这是为什么,是什么意思?