|
-
Jul 13th, 2015, 05:13 PM
#1
Thread Starter
Member
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
-
Jul 13th, 2015, 06:53 PM
#2
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.
 I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
My war with a browser-redirect trojan
-
Jul 13th, 2015, 07:45 PM
#3
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()
My usual boring signature: Nothing
 
-
Jul 14th, 2015, 11:33 AM
#4
Re: Assigning a variable to a class but it shows as "Nothing"?
 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.
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|