public void ClassProxyTest() { var h = new ClassInvocationHandler(); var p = (IPerson)NLite.Reflection.Proxy.NewProxyInstance(typeof(Person), new Type[] { typeof(IPerson) }, h: h, arguments: new object[] { "张三" } ); p.Say("李四"); p.Sex = true; Console.WriteLine(p.Sex); }