应用程序的主入口点应用程序的主入口点应用程序的主入口点
生活随笔
收集整理的這篇文章主要介紹了
应用程序的主入口点应用程序的主入口点应用程序的主入口点
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
/// <summary>
??????? /// 應(yīng)用程序的主入口點(diǎn)。
??????? /// </summary>
??????? [STAThread]
??????? static void Main(string[] args)
??????? {
??????????? Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("CapApp.TestApp.exe");
??????????? byte[] bs = new byte[stream.Length];
??????????? stream.Read(bs, 0, (int)stream.Length);
??????????? Assembly asm = Assembly.Load(bs);
??????????? MethodInfo info = asm.EntryPoint;
??????????? ParameterInfo[] parameters = info.GetParameters();
??????????? if ((parameters != null) && (parameters.Length > 0))
??????????????? info.Invoke(null, (object[])args);
??????????? else
??????????????? info.Invoke(null, null);
??????????? //Application.EnableVisualStyles();
??????????? //Application.SetCompatibleTextRenderingDefault(false);
??????????? //Application.Run(new Form1());
??????? }
??????? /// 應(yīng)用程序的主入口點(diǎn)。
??????? /// </summary>
??????? [STAThread]
??????? static void Main(string[] args)
??????? {
??????????? Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("CapApp.TestApp.exe");
??????????? byte[] bs = new byte[stream.Length];
??????????? stream.Read(bs, 0, (int)stream.Length);
??????????? Assembly asm = Assembly.Load(bs);
??????????? MethodInfo info = asm.EntryPoint;
??????????? ParameterInfo[] parameters = info.GetParameters();
??????????? if ((parameters != null) && (parameters.Length > 0))
??????????????? info.Invoke(null, (object[])args);
??????????? else
??????????????? info.Invoke(null, null);
??????????? //Application.EnableVisualStyles();
??????????? //Application.SetCompatibleTextRenderingDefault(false);
??????????? //Application.Run(new Form1());
??????? }
總結(jié)
以上是生活随笔為你收集整理的应用程序的主入口点应用程序的主入口点应用程序的主入口点的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 本文将引导你使用XNA Game Stu
- 下一篇: remoteing2