Casting one objcet to another
I have to Classes. lets say Invoice and TempInvoice.
Both have same properties(all are same). let say i created a object using Invoice Class. Can i cast that object to another object that i created using tempInvoice ??

ex:

Invoice invoiceobj= getInvoice(int? id) //a method return a invoice object

TempInvoice tempInvoiceObject = invoiceobj// (Need to do it and fill tempInvoice by Invoice Values.even as a new memory location o set by reference.)

Casting one objcet to another
===

I have to Classes. lets say Invoice and TempInvoice.
Both have same properties(all are same). let say i created a object using Invoice Class. Can i cast that object to another object that i created using tempInvoice ??

ex:

Invoice invoiceobj= getInvoice(int? id) //a method return a invoice object

TempInvoice tempInvoiceObject = invoiceobj// (Need to do it and fill tempInvoice by Invoice Values.even as a new memory location o set by reference.)
