0

I use a Form to gather Input from the user, and my program needs to format the info and show it in a Text Box. Everything works except 2 of my variables need to look like this in the output: "variable".

The problem is that I can't find a way to make the variable write with quotations around it. Is there a simple solution to my issue, or am I going to have to find a way around using quotations?

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by jmurph333
0

When I tried that it just printed this: "variable".
Is there anyway I can get it to print a string where the word 'variable' is?

1
textBox1.Text = "\"" + myStringVariable + "\"";

textBox1.Text = String.Format("\"{0}\"", someVariable);

char quote = '"';
textBox1.Text = quote + myStringVariable + quote;

Edited by Momerath: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.