Mrquestion Mrquestion - 1 year ago 106 Question

how to extract lines from txt and getting into String array in Visual Basic

I have a text file in this format:

Number: xxxxx
Name: xxxxx
Last Name: xxxxxx

How can I get each line into a String array or Arraylist?

I found something similar here but it's not clear to me.

Why is not duplicate:
If you don't know the function or method, you will never find the "possible duplicated". If you type my common question in Google or Stack search, you will be able to find it. I think here, some people is too paranoid with duplicates.

Answer Source

Is this what you're after:

Dim lines() As String = File.ReadAllLines("...") 

Replace "..." with your path.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download