Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Streamreader to read specific line

Hi,
I am using visual studio 2005.How to use stream reader to read specific line number in a text?

Cheers
Avatar of Kiran Sonawane
Kiran Sonawane
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of Cluskitt
Cluskitt
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

StreamReader.BaseStream Property?
No. Just declare your streamreader and a string:

Dim oRead As New IO.StreamReader(FileName)
Dim sTemp As String

Then use the loop above to read the 5th line. Change the value to read whichever line you wish to read.