How to escape curly braces in a dynamic string variable, which is used in String.Format?
Edit 1
I am aware of how this can be handled when the value of the string is known. for e.g.
string someStringVar = "This is a random string {0}. Blah {{ Blah {{ Blah }}"
But how to handle it when I am not aware of the strings value. for e.g.
string someStringVar = GetValueFromXmlFile();
In the above code, GetValueFromXmlFile method could return a string with a valid placeholder like {0} but could also contain characters like { or } which are not placeholders? In such a case should one escape { or } without escaping valid placeholder like {0}?