I have to check the values of varbinary data in the text file. For example, in the text file, if the start range is 1100, while the end range is 10FF, it will continue to do the next process, else it will prompt the range is not meet the end range yet.
This is my current code:
- var data = File
- .ReadAllLines(Path)
- .Select(x => x.Split('='))
- .Where(x => x.Length > 1)
- .ToDictionary(x => x[0].Trim(), x => x[1]);
-
- Console.WriteLine("Start: {0}", data["Start"]);
- Console.WriteLine("End: {0}", data["End"]);
-
- if (data["Start"] == data["End"]+1)
- {
-
- }
- else
- {
-
- }
This is the text file
The problem is, the if (data["Start"] == data["End"]+1) does not functioning. any other method that I can do?