Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否有类似于freetemplate for C#的模板引擎?_C#_Templates - Fatal编程技术网

是否有类似于freetemplate for C#的模板引擎?

是否有类似于freetemplate for C#的模板引擎?,c#,templates,C#,Templates,我正在寻找一个模板引擎,比如freemarker(带有select case指令),用于用C#编写生成器。我不熟悉freemarker,但我相信它可以满足您的需要。是我用来生成电子邮件的模板引擎。以下是您的代码。谢谢Dathan,我看过nvelocity,但它似乎没有select指令(尽管castle nvelocity端口中有一个实现),我需要select指令来执行此操作:select case field.type case int:bla,在大多数情况下,switch或select cas

我正在寻找一个模板引擎,比如freemarker(带有select case指令),用于用C#编写生成器。

我不熟悉freemarker,但我相信它可以满足您的需要。

是我用来生成电子邮件的模板引擎。以下是您的代码。

谢谢Dathan,我看过nvelocity,但它似乎没有select指令(尽管castle nvelocity端口中有一个实现),我需要select指令来执行此操作:select case field.type case int:bla,在大多数情况下,
switch
select case
结构只是表示if/then/else控制结构的一种简写方式。(例外情况是
case
块是表达式,if/then/else是语句的语言)。NVelocity没有一个
case
结构,但有一个。你说得对,但我认为这是一种更优雅的方式,就像使用或不使用意大利面条编程一样。。。我对castle nvelocity的看法是错误的,他们也不使用select case,如果它不能满足您的需求,您就不应该接受我的答案,除非它证明没有更好的选项来满足您的需求。有人说,如果你愿意考虑商业提供,就有。