例如D:\temp\下有一个theQuery.st模板,内容如下
SELECT $column; separator=","$ FROM $table$;
-----------------C#代码如下--------------------------------------
StringTemplateGroup group = new StringTemplateGroup("myGroup", "C:/temp");
StringTemplate query = group.GetInstanceOf("theQuery");
query.SetAttribute("column", "name");
query.SetAttribute("column", "email");
query.SetAttribute("table", "User");
-----------------结果如下--------------------------------------
SELECT name,email FROM User;
[责任编辑:jumbot]