|
-
Jan 12th, 2004, 12:00 PM
#1
Thread Starter
Frenzied Member
How do I tell if a class implements an interface?
I've tried TypeOf, which doesn't seem to give me what I want, can't figure out the syntax to IsAssignableFrom.
TIA,
Mike
-
Jan 12th, 2004, 12:04 PM
#2
A search for 'plugin' in the vb.net section should get a lot of good info but this post in particular should be helpful: http://www.vbforums.com/showthread.p...hreadid=194447
As for this and other posts it seems like this is the general direction you are headed.
Oh and to directly answer the question, one easy way is to see if GetInterface returns nothing on the object. If it does then it does NOT implement the interface otherwise it does and returns the interface type info.
Also another option is to use a BaseClass instead of Interface and the IsSubClass function to test for existance.
Last edited by Edneeis; Jan 12th, 2004 at 12:08 PM.
-
Jan 12th, 2004, 01:43 PM
#3
LOL. The post that wouldn't die!
It takes the award for most referenced post.
-
Jan 12th, 2004, 03:06 PM
#4
Long live post 194447!!!!
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
|