using System;
using System.Windows.Forms;
using System.Resources;
using System.Reflection;
using System.IO;
namespace MyNamespace
{
public class Program
{
[STAThread]
static void Main(string[] args)
{
String projectName = Assembly.GetExecutingAssembly().GetName().Name.ToString();
Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(projectName + ".test.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);
}
}
}
04-01