On Sat, 10 Jan 2004 21:24:55 -0500, "Rob Teixeira [MVP]"
<RobTeixeira@@msn.com> wrote:
What exception where you getting?
-Rob Teixeira [MVP]
obj = Activator.CreateInstance(T)
Debug.WriteLine(obj.GetType().ToString())
'THIS LINE FAILS:
objPlugin = CType(obj, IClientPlugin)
It throws an "InvalidCastException" with the message
"Specified cast is not valid." But obj is an instance of my class
called "AppleNET_BBS_PLUGIN" which implements IClientPlugin.
obj.GetType().ToString() returns "ANET_SystemNews.AppleNET_BBS_PLUGIN"
Which is the right class and everything:
Public Class AppleNET_BBS_PLUGIN
Implements IClientPlugin
.. functions defined here
End Class
Any ideas? I think I'll create a new set of projects to try and work
this out.. If it doesn't work, maybe someone can take a look at it (?)
Thanks,
// CHRIS