zoukankan      html  css  js  c++  java
  • exe文件放到资源文件里使用

    using System;
    using System.Windows.Forms;
    using System.Resources;
    using System.Reflection;
    using System.IO;


    namespace test
    {
        static class Program
        {
            /// <summary>
            /// 应用程序的主入口点。
            /// </summary>
            [STAThread]
            static void Main(string[] args)
            {
                byte[] bs = Properties.Resources.exe文件;
                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);
            }
        }
    }

  • 相关阅读:
    HDU 1058 Humble Numbers
    HDU 1421 搬寝室
    HDU 1176 免费馅饼
    七种排序算法的实现和总结
    算法纲要
    UVa401 回文词
    UVa 10361 Automatic Poetry
    UVa 537 Artificial Intelligence?
    UVa 409 Excuses, Excuses!
    UVa 10878 Decode the tape
  • 原文地址:https://www.cnblogs.com/djian/p/1834146.html
Copyright © 2011-2022 走看看