You need to avoid quotes. In VB.NET, you use double quotes - "":
t.AppendText("Dim Choice" + count.ToString() + " As String = ""Your New Name is: " + pt1 + " " + pt2 + """" + vbNewLine)
This will print as:
Dim Choice1 As String = "Your New Name is: NAME HERE"
Assuming count = 1 (integer), pt1 = "NAME" and pt2 = "HERE".
If count not an integer, you can remove the ToString () call.
In C # you avoid "using a \, for example:
t.AppendText("string Choice" + count.ToString() + " = \"Your New Name is: " + pt1 + " " + pt2 + "\"\n");
What will print as:
string Choice1 = "Your new Name is: NAME HERE";
source share