Assigning a variable to a class but it shows as "Nothing"?
Hi,
When I assign a variable to a class:
ie. Dim myIniFile As IniFile
and when hover over myIniFile, it displays that ATE2014.IniFile is assigned to that variable.
However, when I compile the code, myIniFile, it displays that myIniFile is assigned to "Nothing"
Can someone shine some light on me what the problem may be?
Thanks
Re: Assigning a variable to a class but it shows as "Nothing"?
You need to show us some code. Let us see how you're instantiating the class and how/where you determine if the variable is nothing.
Re: Assigning a variable to a class but it shows as "Nothing"?
That code doesn't assign an object to the variable, all it does is creates a variable that can hold a variable of that type. What you are seeing when you hover over the variable is the type name, you wouldn't be able to see a variable during design time, only during runtime. To create an object of that type, you'd have to use New:
Dim myInFile as InFile = New InFile()
Re: Assigning a variable to a class but it shows as "Nothing"?
Quote:
Originally Posted by
Lalaluye
...
ie. Dim myIniFile As IniFile
and when hover over myIniFile, it displays that ATE2014.IniFile is assigned to that variable.
...
Not likely. It tells you that the Class IniFile is in namespace ATE2014.