I have a need to do a memberwise clone in a constructor - for some reason it's not working. Here's the code:
I'm getting the message that Cannot assign to '<this>' because it is read-only ? Any ideas?
Thanks.
Code:
public Fee(Fee BaseFee)
{
// Make a shallow copy of the BaseFee
this = (Fee)BaseFee.MemberwiseClone();
// Set the things we know aren't going to be added to the fees.
_admin = 0;
}
I'm getting the message that Cannot assign to '<this>' because it is read-only ? Any ideas?
Thanks.