leprogrammer
Programmer
Hello.
I am developing a program where I have some textboxes and forward and previous buttons.
I also have a txt file. I want to read from my txt file and then write to my textbox.
My txt file looks like this:
I want it to read one line and then for example set Yeti and 19 into a textbox
When you push forward it reads elite yeti and 20
But I don’t know how to do
I am assuming I need space as a separator and then use like var[3] where 3 is the third word.
A little like in mirc where you can write
$gettok(one two three, 32, 3) where it picks the 3 word with the separator space (32)
But when it gets to the code and not the idea im kinda stuck. Any ideas?
Im using Visual C# 2008 Express Edition
I am developing a program where I have some textboxes and forward and previous buttons.
I also have a txt file. I want to read from my txt file and then write to my textbox.
My txt file looks like this:
Code:
19 1 "Yeti" 30 900 0 105 110 37 0 150 37 2 17 4 6 400 2000 10 2 180 14 6 0 0 3 0 0
20 1 "Elite Yeti" 36 1200 0 120 125 50 0 180 43 3 0 1 6 400 1400 10 2 180 14 6 0 1 4 1 1
21 1 "Assassin" 26 800 0 95 100 33 0 130 33 2 0 1 7 400 2000 10 2 180 14 6 0 0 0 0 0
22 1 "Ice Monster" 22 650 0 80 85 27 0 110 27 2 7 1 5 400 2000 10 2 170 14 6 0 0 3 0 0
23 1 "Hommerd" 24 700 0 85 90 29 0 120 29 3 0 1 5 400 1600 10 2 170 14 6 0 0 3 0 0
24 1 "Worm" 20 600 0 75 80 25 0 100 25 3 0 1 4 400 1600 10 2 160 14 6 0 0 2 0 0
25 1 "Ice Queen" 52 4000 0 155 165 90 0 260 76 3 11 4 7 400 1400 50 2 180 14 3 0 4 5 4 4
I want it to read one line and then for example set Yeti and 19 into a textbox
When you push forward it reads elite yeti and 20
But I don’t know how to do
I am assuming I need space as a separator and then use like var[3] where 3 is the third word.
A little like in mirc where you can write
$gettok(one two three, 32, 3) where it picks the 3 word with the separator space (32)
But when it gets to the code and not the idea im kinda stuck. Any ideas?
Im using Visual C# 2008 Express Edition