PDA

Click to See Complete Forum and Search --> : Reading a string from a text


phrajib
May 16th, 2006, 03:41 AM
Dear Friends,

I have an application developed by C#.NET. I want to read the connection string of a database from a txt file.

How can I read a string from a txt file in C#.NET platform. Please help (with example if possible) .

Waiting for ur quick response....

Rajib

jmcilhinney
May 16th, 2006, 04:05 AM
Create a StreamReader object and call its ReadLine method.

phrajib
May 16th, 2006, 05:20 AM
Please describe more with example...

-Rajib

jmcilhinney
May 16th, 2006, 05:41 AM
Have a look at the help/MSDN topic for the StreamReader class. It provides links to code examples for numerous I/O operations.