J
Joe Fallon
I know that String.Format has the ability to format a string using
placeholders like {0}, {1}, {2} etc.
Is there a way to make a template that uses variables like <% MyVar1 %>
instead of {0}?
(The sole purpose is to increase readability. I will use {0} if there is no
other option.)
e.g.
"This is my template and this value is <% MyVar1 %> and the next value is <%
MyVar2 %>"
Then if I have MyVar1 and MyVar2 in code I want to merge them with the
template to get the final string value.
placeholders like {0}, {1}, {2} etc.
Is there a way to make a template that uses variables like <% MyVar1 %>
instead of {0}?
(The sole purpose is to increase readability. I will use {0} if there is no
other option.)
e.g.
"This is my template and this value is <% MyVar1 %> and the next value is <%
MyVar2 %>"
Then if I have MyVar1 and MyVar2 in code I want to merge them with the
template to get the final string value.