Last post Jun 12, 2008 02:16 PM by innovativebliss
Member
1 Points
16 Posts
Jun 12, 2008 02:32 AM|innovativebliss|LINK
Ok to explain this the best I can :)
At first I had Option Strict set to OFF and got this error
A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll
Then I turned Option Strict On and fixed my errors.
Now Im debugging to run the program and it works perfectly but now it has that same error as above. Does anyone know the problem?
Thanks.
All-Star
16080 Points
3546 Posts
Jun 12, 2008 02:59 AM|johram|LINK
Invalid cast occurs when you do an explicit type conversion that is invalid.
When the exception is thrown, you usually get a call stack that will indicate where it was thrown. Can you see this?
Also see Troubleshooting Exceptions: System.InvalidCastException
Jun 12, 2008 02:16 PM|innovativebliss|LINK
Thanks there was nothing wrong with it. I guess I had to close out of the program and go back in because when I did that, that message didnt show up anymore :)
Member
1 Points
16 Posts
Option Strict = ON
Jun 12, 2008 02:32 AM|innovativebliss|LINK
Ok to explain this the best I can :)
At first I had Option Strict set to OFF and got this error
Then I turned Option Strict On and fixed my errors.
Now Im debugging to run the program and it works perfectly but now it has that same error as above. Does anyone know the problem?
Thanks.
All-Star
16080 Points
3546 Posts
Re: Option Strict = ON
Jun 12, 2008 02:59 AM|johram|LINK
Invalid cast occurs when you do an explicit type conversion that is invalid.
When the exception is thrown, you usually get a call stack that will indicate where it was thrown. Can you see this?
Also see Troubleshooting Exceptions: System.InvalidCastException
Member
1 Points
16 Posts
Re: Option Strict = ON
Jun 12, 2008 02:16 PM|innovativebliss|LINK
Thanks there was nothing wrong with it. I guess I had to close out of the program and go back in because when I did that, that message didnt show up anymore :)