[progress Communities] [progress Openedge Abl] Forum Post: Oobal Upcasting

  • Thread starter Thread starter Kim Ward
  • Start date Start date
Status
Not open for further replies.
K

Kim Ward

Guest
Morning, I'm curious whether it is possible to cast from one type to another type that inherits the top level type. For example (not a great example but hey) From Openedge.Core.String to Package.libs.CustomString. CustomString would inherit from Openedge.Core.String. I have tried simply casting however an "Invalid Cast" error is thrown. This is leading me to believe that this isn't the correct approach to this. Could anyone clarify how this should be handled? I guess I could in theory have CustomString with a constructor that takes an OpenEdge.Core.String and copies over all it's properties but I wouldn't have thought it would require that sort of overhead. Thanks, Kim

Continue reading...
 
Status
Not open for further replies.
Back
Top