How can I format a String in C# where the pattern has brackets? When I run the following statement...
String.Format("Foo { Bar={0} }", this.Bar);
... I receive a runtime exception:
System.FormatException: Input string was not in a correct format.
Should I have to escape the brackets? How to?