int k = Int16.Parse(args [0]);
解决方案 »
- 小弟愚蠢,这个功能只实现一半,实在苦恼!
- C#自定义组件的问题
- 关于winform打印程序的问题,在线等
- 请教Winform程序连接oracle数据库的问题!
- TreeView的SelectedNode问题
- (急)如何判断带复选框的TreeView控件中,节点是否被选中
- 100分问个问题,AJAX
- 打開一个無最大和最小窗體,放在右下
- dateTimePicker怎么设置它为空值?
- 用c#.asp.net和vc.net编程需要装哪些东东?是不是与vc++6.0一样一次就可以搞定???是不是非得装xp系统,2000行不行??
- 加急的SQL问题!!!邹健等大侠们请入......
- socket通信问题
你先判断args的长度来试试.........
{
再操作。
}命令行有可能不传任何参数。
public class One
{
static void Square(int i)
{
int m = i*i;
Console.WriteLine("The Square of teh argument is {0}",m);
}
static void Main(String[] args)
{
Console.WriteLine("the program will convert your string argument to int and display the square of the number.");
if(args.Length>0)
{
int k = Int32.Parse(args [0]);
Square(k);
}
}
}
if(args.Lenght!=0)
{
再操作。
}
或
if(args.Length>0)
{
再操作。
}
但命令行不传任何参数。
怎样对args [0])的实例????