kristolcrawley
Programmer
Can I cast one object to another if the methods contained in both match? I have one object called orderparts and another object which has the same properties as orderparts but it's called orderpartshold. I'm trying to save orderpartshold from orderparts without having to set each field individually. It keeps giving a compiler error, invalid cast.
Object obj = pOrderPartsTable;
OrderPartsHoldTable myOrderPartsHoldTable = (OrderPartsHoldTable ) obj;
Object obj = pOrderPartsTable;
OrderPartsHoldTable myOrderPartsHoldTable = (OrderPartsHoldTable ) obj;