[stringtemplate-interest] Problem with C# dictionaries

brian.kejser at protexis.com brian.kejser at protexis.com
Sun Oct 29 08:22:17 PST 2006


Hi

Here's the C# code:

Dictionary<string, string> dictionary = new Dictionary<string, string>();

dictionary.Add("one", "testing");
dictionary.Add("two", "more testing");

stringTemplate.SetAttribute("value", dictionary);

Here's the first string template:

Start
One: $value.one$
Two: $value.two$
End

Here's its output:

Start
One: testing
Two: more testing
End

Here's the second string template:

Start
$value:{One: $it.one$
Two: $it.two$};separator="\r\n"$
End

Here's its output:

Start
One:
Two:
One:
Two:
End

Shouldn't the outputs be the same? Am I doing something wrong or is this a
bug?

Thanks




More information about the stringtemplate-interest mailing list