cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
As per the subject line.. I am boxing an object:
Dim x as Parent = New Child
In the constructor of parent, I log an entry:
log.Write("A new " & Me.GetType() & " was created")
-
Problem is, this always writes "A new parent was created".. I need to know which child was created, so what else can i use in place of GetType() to return the type of the object, not the type of the box?
Dim x as Parent = New Child
In the constructor of parent, I log an entry:
log.Write("A new " & Me.GetType() & " was created")
-
Problem is, this always writes "A new parent was created".. I need to know which child was created, so what else can i use in place of GetType() to return the type of the object, not the type of the box?