Home > Software engineering >  "ConsoleApplication1. Exe" type of exception
"ConsoleApplication1. Exe" type of exception

Time:09-22

Do program recently, always appear in the System. When debugging IndexOutOfRangeException for the first time in the occasional "ConsoleApplication1. Exe" type of exception, or System. InvalidCastException for the first time in the occasional "Microsoft. VisualBasic. DLL" type of exception, what should I do?? To solve the

CodePudding user response:

Collapsed in the pop-up dialog box, press the corresponding button to enter debugging press Alt + 7 key to view the Call Stack, namely "the Call Stack" from the inside to the following out of from the inner to outer function Call history, double-click a row to the cursor to the Call of the source code or assembly instruction, don't understand when double click on the next line, until we can read ,

CodePudding user response:

Answered the same question: System. IndexOutOfRangeException in occasional exceptions for the first time

CodePudding user response:

System. IndexOutOfRangeException mean an array, using arrays index beyond the border, according to the exception to the code position to find the corresponding array, if there is no clear code position, simply run the exe, don't run in the development environment, an error when there will be errors in detail, also does not see, will go to check each array/List
System. InvalidCastException mean type conversion error, generally occur at the time of data types are not compatible, check any ctype operation, if not met an implicit conversion, according to the abnormal given to find the code position, treatment method and the above, if you can not find, can only see each each variable when using any type does not match
  • Related