How to make NullFun.Method to write "true" to Console?
Read below for the answer.
public class NullFun { public void Method () { Console.WriteLine(this == null); } }
Read below for the answer.
class Program { delegate void Method(); static void Main(string[] args) { typeof(NullFun).GetMethod("Method").CreateDelegate(typeof(Method), null).DynamicInvoke(); } }
No comments:
Post a Comment