CodeDom: Equivaluent for: expression is type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • StealthyMark

    #1

    CodeDom: Equivaluent for: expression is type

    Is there a possibility to generate a CodeDomExpressi on for an expression like

    object obj = anything;

    if (obj is Attribute)
    ...

    For now, im using a workaround by creating the equivalent code:

    if (
    !object.Referen ceEquals(obj, null)
    &&
    typeof(Attribut e).IsAsignableF rom(obj.GetType ())
    )
    ...

    Mark
Working...