0

Currently I am running a program that receives data from an outside device and displays it to the console. I need to be able to take the information received and save it to a log file of some sort. I then need to be able to parse each line for several different things. My information is seperated by "comma's" which should make the parsing easier. This is an example of my string that I need individual data parsed from.

$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Ramy Mahrous
0

Dear bumassjp,
I got your problem in getting each item
So,

Read file data

string data = null;
data = File.ReadAllText("FilePath");
data = data.Remove(0); //to remove $
string items = data.Split(','); // to get each item

in your input the items[2] would be 'A' vbrep_register("432928")

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.