c#中命令行参数的作用?

[复制链接]
查看11 | 回复2 | 2009-8-10 21:34:51 | 显示全部楼层 |阅读模式
某些场合确实有用,你用过ping命令没有。ping.exe在system32文件夹下,我们ping 192.168.1.1的时候,192.168.1.1就是命令行参数。你也可以实现类似的功能
回复

使用道具 举报

千问 | 2009-8-10 21:34:51 | 显示全部楼层
你按F1键就可以帮助你了
回复

使用道具 举报

千问 | 2009-8-10 21:34:51 | 显示全部楼层
就是给运行的程序提供参数 static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
MessageBox.Show(args[0]);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmFavority());
}
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行