I have a for loop that reads lines from an Excel file, checks them and inserts the data into an SQL database using LINQ.
The strange thing is that when I debug the program, it doesn’t seem to run in the order of the code, it just jumps from one line to any other line, then and back to a previous line of code.
I can’t debug like that. It’s strange and I am afraid that this behaviour might affect the final results.
Any ideas?
Maybe the code being executed is not the same as the one you see in the debugger. Try to rebuild your solution to ensure the most current version is being executed.