-1
String^ fileName = "C:\Users\source\repos\Project1\" + textBox1->Text + ".txt";

How to ignore the \" ? Image of code

UserXyZ
  • 3
  • 4

1 Answers1

1

I think this is what you want. You need to escape the '\'.

String^ fileName = "C:\\Users\\source\\repos\\Project1\\" + textBox1->Text + ".txt";
Daniel
  • 1,291
  • 6
  • 15