Forwards
Travelling on through software development
Thursday, December 18, 2008
String.Format - how do you escape curly braces
Took me a little bit of googling to find this out...
Basically if you want your output to be "{like INPUT_HERE this}" then you need to use:
string.Format("{{like {0} this}}", input);
i.e. you escape the curly braces by doubling them up.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment