I am trying to load data from a DAT file into an array.
My data is composed of multiple rows in the following format:
param_1::param_2::value
I want to read this data in and convert it to a 2D-array (or other suitable format), so I will have:
myData[param_1,param_2]=value
Currently I am trying to read in the file into a an array of strings using StreamReader, but do not know how to convert the data from strings into the format I need.
This is the read part I'm using right now. What do I need to do to parse the data correctly?
StreamReader reader = new StreamReader("file.dat");
string strAllFile = reader.ReadToEnd().Replace("\r\n", "\n").Replace("\n\r", "\n");
string[] arrLines = strAllFile.Split(new char[] { '\n' });
Thanks for your help!