What's the difference between casting using (Object as TClass) and TClass(Object)
- by Peter Turner
Got an issue where MyObj.classnameis(TMyClass.classname) is true and TMyClass(MyObj) works but (MyObj as TMyclass).doSomething throws a conversion error.
I don't really want any help with that junk, although if you want to put it in the comments that'd be super. I just would like to know what the difference between Obj As Class and Class(Obj) is.