expressionhandle表达式中使用非ocl变量

来源:互联网 发布:西安软件开发培训班 编辑:程序博客网 时间:2024/06/05 04:12
从blog.org的我的原博客中迁入

发表时间:2007-10-1 10:08:47

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可以是你指定的字符串变量

原创粉丝点击