Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何添加<;div class=";“拇指包装纸”&燃气轮机;作为字符串?_C#_.net - Fatal编程技术网

C# 如何添加<;div class=";“拇指包装纸”&燃气轮机;作为字符串?

C# 如何添加<;div class=";“拇指包装纸”&燃气轮机;作为字符串?,c#,.net,C#,.net,我有一句话: index = html.IndexOf("<div class="thumbWrapper">"); index=html.IndexOf(“”); 我需要以某种方式使用转义,因此将是一个字符串。将“转义为\”: int index=html.IndexOf(“”); 试试:@“ int index = html.IndexOf("<div class=\"thumbWrapper\">");

我有一句话:

index = html.IndexOf("<div class="thumbWrapper">");
index=html.IndexOf(“”);
我需要以某种方式使用转义,因此将是一个字符串。

转义为
\”

int index=html.IndexOf(“”);
试试:
@“

int index = html.IndexOf("<div class=\"thumbWrapper\">");