Vis*_*rma 5 c# reflection metadata methodinfo
var className = typeof(Console);
var methodInfo = className.GetMethod("WriteLine",new [] { typeof(string) });
Run Code Online (Sandbox Code Playgroud)
我有一个Writel方法的methodInfo对象,现在如果我们看到该方法的定义,它看起来像这样.
//
// Summary:
// Writes the specified string value, followed by the current line terminator,
// to the standard output stream.
//
// Parameters:
// value:
// The value to write.
//
// Exceptions:
// System.IO.IOException:
// An I/O error occurred.
public static void WriteLine(string value);
Run Code Online (Sandbox Code Playgroud)
我想要的是得到一个特定方法的评论.,有什么办法可以用反射实现这个目的吗?或任何其他可能的方式?
| 归档时间: |
|
| 查看次数: |
939 次 |
| 最近记录: |