0

I want assign following string to foo variable but i cant write it since it contains multiple " charecters. How can i assign this text in this variable without removing "

string foo = @"<span class="stat"><span class="green">$208.95</span></span>";
John Brk
  • 67
  • 6

1 Answers1

1

Escape by double-double quoting:

string foo = @"<span class=""stat""><span class=""green"">$208.95</span></span>";
see sharper
  • 10,464
  • 7
  • 39
  • 59