Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

WriteAllLines, ReadAllLines; StreamReader, StreamWriter?

$
0
0
Using either the WriteAllLines/ReadAllLines or StreamReader/StreamWriter, how
could you retrieve specific/ in-between information from the file "C:\Users.txt".

The file "C:\Users.txt" looks like this >

Code:

#Users
John
Ashley

#Stats
John
HP: 100
Ashley
HP: 100

I am attempting to accomplish 2 simple tasks with the above information:

1) Retrieve the list of users to a MessageBox.Show(ListofUsers)

2) Retrieve Johns HP to a MessageBox.Show(JohnsHP)

Can someone please show me how to do this by code example using the above
information?

Thanks, VBBBQ

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>