Re: implement

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Nemtsev [MVP]

    Re: implement

    Hello J-L,

    Use

    if (typeof(MyInter face).IsAssigna bleFrom(MyObjec tType))

    or

    if (MyObjectType.G etInterface(typ eof(MyInterface ).FullName)


    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    JHI,
    J>
    JI don't find the method ro detect if a class implement an interface.
    J>
    JI try
    J>
    Jif (MyObject implements MyInterface)
    J>
    Jbut it doesn't work.
    J>
    Jif (MyObject is MyInterface)
    J>
    Jwork. Is it the only method to do that ?
    J>
    JJ-L
    J>


Working...