I am extracting a line from the output file, which will always be either Ok or Err . After that, I pass this result Ok or Err to the Enum property, which is good, everything works, but I'm sure there should be a better way than mine.
Since I extract 3 characters in case Ok selected, I need to remove the third element from Ok ; result.
string message = File.ReadAllText(@"C:\Temp\SomeReport.txt").Substring(411, 3); if (message == "Ok;") // `;` character should be removed in case that Ok is fetched { message = "Ok"; }
thanks
source share