C#中通过方法名构建MethodInfo?
这个得通过委托实现。Action或者Func。
一段示例代码如下:
MethodInfo method = (new Func<int, string>(i => i.ToString())).Method;
使用过程中要注意函数的重载。可以参考如下链接: https://docs.microsoft.com/en-us/dotnet/api/system.delegate.method
C#中通过方法名构建MethodInfo?
这个得通过委托实现。Action或者Func。
一段示例代码如下:
MethodInfo method = (new Func<int, string>(i => i.ToString())).Method;
使用过程中要注意函数的重载。可以参考如下链接: https://docs.microsoft.com/en-us/dotnet/api/system.delegate.method
投稿邮箱:1052839972@qq.com
这将是创作的最大动力