expressionhandle的expression中要使用变量,一般要用到variablehandle变量,很麻烦.如一般的字符串变量可使用以下方法解决
c#
eh.Expression =
System.String.Format("Person.allInstances->orderBy({0})', button1.Text);
Delphi:
eh.Expression :=
System.String.Format('Person.allInstances->orderBy({0}),
´[button1.Text]);
其中button1.text可以是你指定的字符串变量
本文介绍了一种在ExpressionHandle中简化变量使用的技巧,通过格式化字符串的方法,避免了使用VariableHandle带来的复杂性,使得表达式的设定更为简洁高效。
37

被折叠的 条评论
为什么被折叠?



