What do I do wrong here?
string tmp = @\"
if (UseImageFiles) {
vCalHeader += \"\"
-
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) {{
...
}}";
讨论(0)
- 热议问题