|
-
May 10th, 2010, 04:36 PM
#1
How to read from a text file into a textbox?
Is this correct way?
StreamReader f = new StreamReader(new FileStream("c:\afile.txt", FileMode.Open, FileAccess.ReadWrite));
char[] d = new char[????????];
f.ReadBlock (d, 0, ??????); - or maybe f.Read()?
textBox1.Text = new string(d);
All MSDN/gooogle examples talk about lines... I want read ALL text, not only one line...
How to learn the length of the text?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|