在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Reflection; using System.IO; namespace WindowsFormCaller { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AppDomain.CurrentDomain.AssemblyResolve += delegate(object sender, ResolveEventArgs senderArgs) { //Console.WriteLine("AssemblyResolve...!!!"); Assembly executingAssembly = Assembly.GetExecutingAssembly(); string name = new AssemblyName(executingAssembly.FullName).Name; string str2 = new AssemblyName(senderArgs.Name).Name; string str3 = name + "." + str2 + ".dll"; //Console.WriteLine("!executingAssembly.FullName={0},{1}", executingAssembly.FullName, str3); using (Stream stream = executingAssembly.GetManifestResourceStream(str3)) { byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); return Assembly.Load(buffer); } }; //InnerMath.Math.SayHi(); Application.Run(new Form1()); } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using InnerMath; namespace WindowsFormCaller { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { InnerMath.Math.SayHi(); } } }
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论