在VS C#2003中,我们通过下面的方法获取启动参数:
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
}
在2005中好象封装了该函数,那么如何获得启动参数呢?
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
}
在2005中好象封装了该函数,那么如何获得启动参数呢?
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.Run(new Form1(args))
}------------------------
public Form1(string[] args)
{
使用args
}这样就不用全局变量了