I am just learning to code in C# and need to parse a file that is in the following format:
[VOR]
YMS 114.500 N044.08.35.400 W080.08.46.200
YTP 116.550 N043.40.18.00 W079.39.51.000
YWT 115.000 N043.27.31.200 W080.22.45.600
YSO 117.350 N044.14.19.200 W079.10.30.000
YYZ 112.150 N043.39.28.800 W079.37.54.000
[NDB]
OO 391 N043.55.18.000 W078.54.18.000
KZ 248 N043.56.01.000 W079.19.44.999
TZ 257 N043.36.46.000 W079.23.07.999
ZDH 385 N043.44.17.000 W079.34.11.000
ZLP 341 N043.37.41.000 W079.43.55.000
ZTO 403.000 N043.44.19.671 W079.42.09.868
ZYZ 368.000 N043.37.10.222 W079.32.56.396
[Next Section]
....
The amount of data in each section is different in every file.
I need a way to get data from one section at a time. I know how to read and split the lines but cant seem to figure out how to only grab data from one section.
Any help would be great.
Thanks
[VOR]
YMS 114.500 N044.08.35.400 W080.08.46.200
YTP 116.550 N043.40.18.00 W079.39.51.000
YWT 115.000 N043.27.31.200 W080.22.45.600
YSO 117.350 N044.14.19.200 W079.10.30.000
YYZ 112.150 N043.39.28.800 W079.37.54.000
[NDB]
OO 391 N043.55.18.000 W078.54.18.000
KZ 248 N043.56.01.000 W079.19.44.999
TZ 257 N043.36.46.000 W079.23.07.999
ZDH 385 N043.44.17.000 W079.34.11.000
ZLP 341 N043.37.41.000 W079.43.55.000
ZTO 403.000 N043.44.19.671 W079.42.09.868
ZYZ 368.000 N043.37.10.222 W079.32.56.396
[Next Section]
....
The amount of data in each section is different in every file.
I need a way to get data from one section at a time. I know how to read and split the lines but cant seem to figure out how to only grab data from one section.
Any help would be great.
Thanks
Comment