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
Meriadoc Lawes
NA
1
0
Can't read a text file
Dec 2 2009 2:44 PM
i'm trying to read the text in a text file. This is my code: namespace ReadFileTest { public partial class Form1 : Form { public Form1() { InitializeComponent(); } System.Reflection.Assembly ass = System.Reflection.Assembly.GetExecutingAssembly(); private void button1_Click(object sender, EventArgs e) { System.IO.StreamReader myFile = new System.IO.StreamReader(ass.GetManifestResourceStream(@"ReadFileTest.TextFile1.txt")); while (myFile.Peek() != -1) { myFile.ReadLine(); } string myString = myFile.ReadToEnd(); myFile.Close(); textBox1.Text = myString; } } }
Reply
Answers (
1
)
Error in wacom pressure level
Having trouble with Document_Complete Event of Axwebbrowser component for a crawler.