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);
}
}
}