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
nusaiguy
NA
8
0
Help, writing and opening a text file.
Dec 4 2003 3:38 PM
Hey guys, I'm trying to figure out how to get my program to write its informaiton to a .txt file and than be able to open the file up and read it. this is the code for the button private void HMSNviewfile_Click(object sender, System.EventArgs e) { FileStream fs = new FileStream ("list.txt", FileMode.Create, FileAccess.ReadWrite); StreamWriter HMSNfile = new StreamWriter (fs); HMSNfile.WriteLine(" Title :"); HMSNfile.WriteLine(" Tool Number Tool Name Quantity Price "); for (int i=0; i < HMSNNUMBER_OF_RECORDS; i++) { //HMSNfileOutput.Position = i * HMSNRecord.HMSNSIZE; HMSNfile.Write(HMSNblankRecord.HMSNTOOLNO); HMSNfile.Write(HMSNblankRecord.HMSNTOOLNAME); HMSNfile.Write(HMSNblankRecord.HMSNQUANTITY); HMSNfile.Write(HMSNblankRecord.HMSNPRICE); } }
Reply
Answers (
4
)
Getting a directory listing from a web site
Redrawing Controls