A scanf format string (scan formatted) is a control parameter used in various functions to specify the layout of an input string. The functions can then divide the string and translate into values of appropriate data types. String scanning functions are often supplied in standard libraries.
string format - uses under the hood- StringBuilder - which is much faster for working with strings. ToString is the default representation of an object. Follow this answer to receive notifications.
string.Format()
considers each '{' or '}' to be part of a placeholder (like '{0}' you already use). You need to escape each literal occurrence by doubling it.
So in your case do:
string tmp = @"
if (UseImageFiles) {{
...
}}";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With