How to get what a variable is dimmed as? How to get what an object is declared as? If variable or object is Nothing?
- From: recurr <recurr@xxxxxxxxx>
- Date: Sun, 9 Dec 2007 00:21:13 -0800 (PST)
How to get what a variable is dimmed as? How to get what an object is
declared as? If variable or object is Nothing?
I want to do something like the following, but TypeOf and GetType
doesn't seem to work when a variable is Nothing. The watch window is
able to find the type, so why can't I with TypeOf or GetType()?
Public something as SomeClass
Public Sub SomeSub() as Boolean
If TypeOf something Is SomeOtherClass Then
' Do something here
End If
End Sub
? something.GetType() ' prints Referenced object has a value of
'Nothing'.
.
- Follow-Ups:
- Prev by Date: CurrentRowIndex always returns Zero.
- Next by Date: Re: StreamWriter Problem
- Previous by thread: CurrentRowIndex always returns Zero.
- Next by thread: Re: How to get what a variable is dimmed as? How to get what an object is declared as? If variable or object is Nothing?
- Index(es):