TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kristanbain
NA
1
0
Saving with Listbox
Nov 17 2003 7:22 PM
Hey everyone!! I hope that someone can give me a hand here. I am trying to save to a file but inside file needs the content of a list box. Here is the code I am using private void btnSave_Click_1(object sender, System.EventArgs e) { try { SaveFileDialog Save = new SaveFileDialog(); Save.Filter="txt files (*.txt)|*.txt|All files (*.*)|*.*" ; if (Save.ShowDialog()==DialogResult.OK) { string fileName= Save.FileName; FileStream fs = new FileStream(fileName,FileMode.Create, FileAccess.Write, FileShare.None); StreamWriter sw = new StreamWriter(fs); sw.WriteLine(//??????????????????????? WHAT GOES HERE); //NEED CODE FOR WRITELINE!! sw.Flush(); sw.Close(); } } catch(Exception ex) { Console.WriteLine(ex.StackTrace); } I hope someone can help!! Thanks a lot!
Reply
Answers (
1
)
c# and VB.NET's Implements
Identify File without Extension