using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Web; using System.Web.SessionState; namespace DIDAO.Admin.Common { public class BaseController : IHttpHandler, IRequiresSessionState { public voi…
type TForm1 = class(TForm) public published procedure DoJsCall(str:string); //必须声明方法为published function DoJsCall2(str:string):Tobject; end; TProcedure = function(Param: string):Tobject of…
使用反射,我们可以很容易地在运行时调用一些编译时无法确定的属性.方法等.然而,如果方法的参数中包含 ref 或 out 关键字的时候,又该怎么调用呢? 本文将介绍如何反射调用含 ref 或 out 关键字的方法. 比如我们有这样的类型: public class Walterlv { public string Get(string key) { } } 那么反射的时候可以使用: var walterlv = new Walterlv(); var value = (string) typeof…