I want to create a text file using the content of a TextBox as input.
When I run my app, I get this error when trying to execute this task on button click:
System.IO.IOException: 'The filename, directory name, or volume label syntax is incorrect: 'C:\Users\Jason\source\repos\App1\App1\bin\Debug\netcoreapp3.1@C:\Users\Jason\Desktoppptest.txt''
Here's my code:
private void button1_Click(object sender, EventArgs e)
{
string filename = ("@C:\\Users\\Jason\\Desktop\app") + (textBox2.Text) + (".txt");
File.Create(filename);
}