|
-
Feb 27th, 2010, 05:21 PM
#1
Thread Starter
Member
Using streamreader
I have a richtextbox on my form in which I would like the user to be able to save anything they type or display any .txt file they open.
How can I use the stream reader to read the entire rich text box and place the text into a variable? What type of variable should I be using to store the input?
-
Feb 27th, 2010, 05:28 PM
#2
Re: Using streamreader
You don't need a stream reader to load or save anything in the RichTextBox, as it has its own Load and Save methods you can use.
That said, if you want to store the text of the RTB in a variable, then you don't even need them (and certainly no streamreader). Just save the Text property (or possibly Rtf property if you want the formatting too) into a String variable.
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
|