THE DEFENDANT IN DEFAULT UNDER A CON TRACT. When a defendant is in default under a contract because performance by him has become impossible. the plaintiff is entitled to recover in quasi contract for benefits conferred by him upon the defendant provided the defendant's failure to perform is total, or if partial only it may be apportioned to the excess of benefits given by the plaintiff; and this is permitted irrespec tive of the liability of the defendant to respond in damages for breach of con tract. Thus freight money paid in advance may be recovered from the carrier if performance by him becomes impossible; or if one has paid in advance for the personal services of another who is unable to perform because of sickness or death, he may recover in quasi con tract the proportion of the compensation remain ing unearned. The same rule of recovery is ap plied whenever the defendant is willfully or in excusably in default under his contract under such circumstances that he may be said to have abandoned the contract. In ease the defendant is in default under a contract which is illegal, the plaintiff's right of recovery in quasi contract depends upon the character of the contract. If
the contract is malum in se there can he no re covery in quasi contract. If it is malum pro hibitum there can still be no recovery if the plaintiff is in equal wrong (in pari delicto) with the defendant. If, however, the plaintiff is not in pan delicto, he may recover the value of the performance which he has given to the defendant under his contract.
In general, whenever a defendant is in default under a contract which cannot be enforced be cause it does not comply with the statute of frauds, the plaintiff may recover the money value of the performance which he has given to the defendant under his contract. The measure of recovery, as in all other cases of quasi contract. is the value of the benefit conferred on the defend ant by the plaintiff, and not necessarily the con tract price.
• In all cases the basis of recovery is the duty of the defendant to restore to the plaintiff money or money value of property which he has received at the plaintiff's expense and which upon legal or equitable grounds he should return to the plaintiff. Consult Keener, The of Quasi Contracts. (New York, IS93).