By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,300 Members | 1,867 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,300 IT Pros & Developers. It's quick & easy.

How to create a file from textbox file name

P: 4
I need to read a file from a text box and create a new file using file.create command and the new file should have.enc extension.

I tried but can't get it to work.

the program goes like this
Expand|Select|Wrap|Line Numbers
  1.  BinaryReader br = new BinaryReader(File.Open(textBox1.Text, FileMode.Open));
  3. BinaryWriter bw = new BinaryWriter(File.Create()) // in this line i need to create a file from textBox1.Text having differentextension.
May 20 '10 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,525

Read up. There are options there to change extensions. I use it a lot just to make sure I have the right extention - or include one if it is missing.
May 21 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.