更新时间:2021-12-03 22:23:10
主要方法是静态的,您无需传递 Invoke
实例.您必须这样称呼它:
Main method is static, you don't need to pass Invoke
an instance. You have to call it like this:
var parameters = m.GetParameters().Length == 0 ? null : new[] { new string[0] };
m.Invoke(null, parameters);
此代码处理 Main()
和 Main(string [] args)
变体.