I’ve just installed ie9 and now my program using mshtml’s IHTMLStyle no longer can be casted.
so I pretty much had
class Style
{
mshtml.HTMLStyle mStyle;
Style(mshtml.IHTMLStyle style)
{
mStyle = style as mshtml.HTMLStyle
}
}
and it used to work, but now mStyle always ends up being null. I tried doing an explicit cast, i.e. (mshtml.HTMLStyle)style, but that ended up not working because it says that the actual type of style is a System.__ComObject when I know it used to cast just fine before I had ie9 installed.
does this sound like anything anyone else has run into?
Use later binding with ‘dynamic’
like this :