Ale*_*xey 5 c# reflection
假设我的程序中有两种类型,Foo并且Bar.两者都有static void Main(string[] args).要编译此程序,需要编译器标志/main:class.
Foo
Bar
static void Main(string[] args)
/main:class
是否有可能在运行时确定哪两种类型包含入口点,即获取TypeInfo或MethodInfo指向正确的类或正确的Main方法?
TypeInfo
MethodInfo
Main
UPD:更确切地说,是否可以从链接到主应用程序的类库(即,没有可能的选项的先验知识)这样做?
Hen*_*man 9
一个组件有一个 public virtual MethodInfo EntryPoint { get; }
public virtual MethodInfo EntryPoint { get; }
归档时间:
8 年,11 月 前
查看次数:
124 次
最近记录: