
Signature
moondaddy@noemail.noemail
> I'm writing a .net3.0 WPF app in c# and want to determin if an object
> implements a certain interface something like this:
[quoted text clipped - 8 lines]
> Where ISelectable is the interface I'm looking for. In otherwords, how do I
> determin if 'elem' implements ISelectable?
if (elem is ISelectable)

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Keith Patrick - 26 Feb 2007 22:34 GMT
You can also use Type.IsAssignableFrom (if you have the type but not the
object ref)
moondaddy - 27 Feb 2007 20:21 GMT
Thanks Jon,
That was too easy!
>> I'm writing a .net3.0 WPF app in c# and want to determin if an object
>> implements a certain interface something like this:
[quoted text clipped - 11 lines]
>
> if (elem is ISelectable)