Environment.GetCommandLineArgs();

在console app中,并不是一定非要Main中获取command args,

也可以通过 Environment.GetCommandLineArgs();在其他方法中获取command args.

public static void Main(string [] args)

{

......

Test();

....

}

private Test()

{

......  

Environment.GetCommandLineArgs();

......

}

posted @ 2009-12-30 18:54  Zhongjian Zhang  阅读(1798)  评论(0编辑  收藏  举报