wildfire1982
Regular
I have just moved from vb6 to .net and im using a module to store global variables in. I dont get any problems when writing the code but when it compiles and runs, the program gives a runtime exception where it gives "nullReferenceException" i understand what this means but i cant see why im getting it.
The module has publicly declared variables and a jagged array of type string so i assumed that you could use these variables by using
variableName = moduleName.variable
ok so that doesnt work so i tried casting it from the module into the function where its being used i.e
dim variableName as moduleName.variable
still no luck. Im sure its so simple its unbelievable but this is only the 3rd time i have used .net and am still getting to grips with it.
Any pointers would be great. Ta very muchly.
Chris
The module has publicly declared variables and a jagged array of type string so i assumed that you could use these variables by using
variableName = moduleName.variable
ok so that doesnt work so i tried casting it from the module into the function where its being used i.e
dim variableName as moduleName.variable
still no luck. Im sure its so simple its unbelievable but this is only the 3rd time i have used .net and am still getting to grips with it.
Any pointers would be great. Ta very muchly.
Chris