如何获取匿名方法的源代码?
例如:
Func<Boolean> func = (() => DateTime.Now.Seconds % 2 == 0);
Console.WriteLine(GetSourceCode(func)); // must: DateTime.Now.Seconds % 2 == 0
String GetSourceCode<T>(Func<T> f) - ???
如何获取匿名方法的源代码?
例如:
Func<Boolean> func = (() => DateTime.Now.Seconds % 2 == 0);
Console.WriteLine(GetSourceCode(func)); // must: DateTime.Now.Seconds % 2 == 0
String GetSourceCode<T>(Func<T> f) - ???