0
我已经创建了Windows应用程序..我需要添加参数到Main方法,所以我通过重载字符串[]参数改变了我的主要方法。Windows应用程序.exe没有通过修改更新主要方法
如果我改变任何改变程序类的主要方法它不通过我的应用程序.exe更新为什么?
复制的代码之前,从其他类
static class Program
{
private static string x= string.Empty;
private static string y= string.Empty;
private static string z= string.Empty;
public static void Main(string[] args)
{
try
{
if (args.Count() > 0)
{
if (args.Count() != 3)
{
RootDirectory = args[0];
SourceFile = args[1];
DestinationFile = args[2];
Form1.GetCommandLineArgs(x, y, z);
}
else
{
throw new Exception("");
}
}
else
{
throw new Exception();
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
catch (Exception ex)
{
Common.AppUtilties.LogError(ex, "OnFailure, " + ex.Message);
Environment.Exit(0);
}
}
}