How to create a .txt file using c#?
<p>I have a window which has two textboxes namely Username and Password and two buttons namely Save and Close. I want to create a .txt file when the save button is clicked.The name of the text file should be the Username and have details of username and password in it. So every time when I save with a different Username it creates a text file with the username as file name. </p>

<pre><code>string fileName = textBox1.Text + ".txt";
File.Create("C:\\Users\\User\\Documents\\1ClickData\\ID\\fileName.txt");
</code></pre>

<p>The above code is not working for me. Please help.</p>

<p>Also the textboxes are transparent. I don't want them to be transparent. Please help me out in this also. Thank you.</p>