In C#, there are a couple of better ways to do this: you can escape the double quote character:
File.Write(" QUESTID = LuaGetQuestID(\"" + textBox1.Text + "\")\r\n");
Or you can use string interpolation and escape it:
File.Write($" QUESTID = LuaGetQuestID(\"{textBox1.Text}\")\r\n");
Comment:
You can't include '\r' or '\n' in verbatim strings. The only interpreted character sequences are "double double-quote" for a double quote, and double curly braces for curly braces in verbatim interpolated strings:
PointF p = new PointF(12.3F, 55.9F);
Console.WriteLine(@$"""{p.ToString()}""{\r\n}");
Will give you
"{X=12.3, Y=55.9}"{\r\n}