Solved

read specific line in  a text file

Posted on 2008-06-23
2
428 Views
Last Modified: 2008-06-23
How can I read a specific line and a text file. for example, I want to get a data from a text line just on line number 25. This contains probably about 60 to 70 lines.
0
Comment
Question by:VBdotnet2005
2 Comments
 
LVL 13

Accepted Solution

by:
iHadi earned 125 total points
Comment Utility
Hi

Try the following code:

Dim str() as string = File.ReadAllLines("C:\\a.txt")
Console.WriteLine(str(24))
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
Code above assume you have this at the top:

Imports System.IO
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now