Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string filePath = @"C:UsersNDownloadsshort1.csv";
- string path = @"C:UsersNDownloadsTest.log";
- StreamWriter SW = new StreamWriter(@path);
- List<GResults> results = new List<G4Results>();
- List<string> lines = File.ReadAllLines(filePath).ToList();
- foreach (var line in lines)
- {
- string[] column = line.Split(',');
- GResults newResult = new GResults
- {
- Dn = column[5],
- Te = column[9],
- Da = column[7],
- Se = column[0],
- Pa = column[6],
- Tomin = column[15],
- Tomax = column[16],
- Toact = column[17]
- };
- results.Add(newResult);
- }
- foreach (var GResults in results)
- {
- SW.WriteLine($"{GResults.Dn} | {GResults.Te} | {GResults.Da} | {GResults.Se} | {GResults.Pa} | {GResults.Tomin} | {GResults.Tomax} | {GResults.Toact}");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement