How to escape brackets in a format string in .Net
- by Pop Catalin
How can brackets be escaped in a C# format string so, something like :
String val = "1,2,3"
String.Format(" foo {{0}}", val);
doesn't throw a parse exception but actually outputs the string " foo {1,2,3}"
Is there a way to escape the brackets or should a workaround be used.