thanks a lot for the code.
i am using an alternative way. now iam using rich text
box control where we can  direclty load the content of
a file  by using loadfilemethod of richtextbox
control.
thanks
george
--- Greg Reinacker <[EMAIL PROTECTED]> wrote:
> Use a StreamReader object.  Here's an example for
> reading the entire
> contents of a file into a string.
>
>    StreamReader sr = new
> StreamReader(@"c:\myfile.txt");
>    string s = sr.ReadToEnd();
>    sr.Close();
>
> Greg Reinacker
> Reinacker & Associates, Inc.
> http://www.rassoc.com
> http://www.rassoc.com/gregr/weblog/
>
> -----Original Message-----
> From: The DOTNET list will be retired 7/1/02
> [mailto:[EMAIL PROTECTED]] On Behalf Of
> george antony
> Sent: Sunday, June 23, 2002 9:01 AM
> To: [EMAIL PROTECTED]
> Subject: reading from a stream
>
>
> hi all
> I have a openfile dialog box. I have to open a file
> and assign the contents of a file to a textbox.
> when i use the openfile() method of a openfiledialog
> it gives me a stream object. how to read from stream
> and assign to textbox.
>
>
> regards
> george
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> You can read messages from the DOTNET archive,
> unsubscribe from DOTNET,
> or
> subscribe to other DevelopMentor lists at
> http://discuss.develop.com.
>
> You can read messages from the DOTNET archive,
> unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at
http://discuss.develop.com.


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to