I’m trying to include quotes into my string to add to a text box, i am using this code.
t.AppendText("Dim Choice" & count + " As String = " + "Your New Name is: & pt1 + "" & pt2 +" + vbNewLine)
but it doesnt work, i want it to output like so:
Dim Choice As String = "Your New Name is: NAME_HERE"
You have to escape the quotes. In VB.NET, you use double quotes – “”:
This would print as:
Assuming count = 1 (Integer), pt1 = “NAME” and pt2 = “HERE”.
If
countis not an Integer, you can drop the ToString() call.In C#, you escape the ” by using a \, like this:
Which would print as: