Is casting expensive?

I assume by “doubt” you mean “question!”

Yes, when you cast, you get an instance of the particular class (or one of its subclasses.)

If you cast to UWhatever, and then call GetClass() on the object, then you will get a class object that is UWhatever or some subclass of UWhatever.

1 Like