Grimalkyne
Member
- Joined
- Feb 21, 2005
- Messages
- 7
- Programming Experience
- 5-10
I have a function that takes a generic interface ISettings.
I want to treat it differently depending on a more specific type so I use
if typeof x is CSettings then
HandleCSettings(x)
else if typeof x is DSettings then
HandleDSettings(x)
else
HandleDefaultSettings(x)
end if
When I pass in a DSettings object, the tool tip on "typeof x is DSettings" is true but it skips over that block and goes into the HandleDefaultSettings code.
I have recompiled the code, so it's not the view out of synch with the underlying code.
Does anyone have any suggestions?
Thanks
I want to treat it differently depending on a more specific type so I use
if typeof x is CSettings then
HandleCSettings(x)
else if typeof x is DSettings then
HandleDSettings(x)
else
HandleDefaultSettings(x)
end if
When I pass in a DSettings object, the tool tip on "typeof x is DSettings" is true but it skips over that block and goes into the HandleDefaultSettings code.
I have recompiled the code, so it's not the view out of synch with the underlying code.
Does anyone have any suggestions?
Thanks