Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I have converted one of my vb6.0 projects into VB.NET using Visual Studio 2005.
While executing it displays the following errors:

1)Expression does not produce a value
2)How to declare a name
3)Unused local variable
4)null/isnull() is detected
5)Newindex is not a member of system.windows.forms
6)Variable is used before it has been assigned a value a null reference exception could result at run time

I would be most grateful with help resolving the above errors.
Posted
Updated 31-May-11 2:21am
v2

1 solution

Ok without seeing the code that is erroring, thats going to be very hard, apart from

3) Basically you arent using the variable. So it is redundant, you can remove this variable and then this error will go.

6) You need to either check it is NOT NULL before you use it, OR, initialize it with some content. for example Dim i as Integer = 0 rather than Dim i as Integer I believe if you click on the error it will take you to the line of code where the issue lies.

Also, buy yourself a version of Resharper [^] with VB Support. That could help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900