Replies: 2 comments 4 replies
-
That's the case. As |
Beta Was this translation helpful? Give feedback.
-
You are confusing with objects and references. With C++/CLI syntax, you are not casting |
Beta Was this translation helpful? Give feedback.
-
If I cast T1 to T2, which T1 is derived from, now the object is in a narrow-er type, I am aware that the actual type is still T1, you are just pretending it as T2.
My question is :if you store this variable as T2, after a while will this object's data that's not visible right now in a narrow-er type be deleted? or it will remain T1 forever and you can get your data back (if there's any inside T1 thatsn't from T2) by casting back to T1
Beta Was this translation helpful? Give feedback.
All reactions