When this case was before this court, upon a former occasion, it was held that the contract which the plaintiff maintained that the defendant had made with him, was one which, by its terms, permanently entitled him to the business to be transacted. And as such it was within the statute of frauds, and void because it was not in writing. • (Day v. New York Central Railroad Co., (31 Barb. 548.) That conclusion must, therefore, be assumed to be so far the settled law of this case in the present disposition of it. The result of that decision is that the plaintiff agreed to erect and maintain the cattle yards and pens on his own lands for receiving, keeping and shipping on the defendant’s cars, such cattle, sheep, swine, &c. as should be brought over the Great Western Railway, and to convey to the defendant the land required for the construction of the necessary railways upon it for the convenient transaction of that business, upon the sole consideration of the defendants’ void agreement that he (the plaintiff) should permanently have the transaction of that entire business. It was expected by the parties that the emoluments of that business would sufficiently compensate the plaintiff for the value of the land he was *253to convey, and the expenses he would be subjected to in erecting and maintaining the cattle yards and pens. And the agreement of the plaintiff was substantially performed by him, when he conveyed the land to the defendants, and afterwards erected the cattle yards and pens.
Evidence was given, upon the trial, tending to prove that the plaintiff did not complete and maintain the yards and pens in a suitable condition for the convenient and proper transaction of the business to be done in them, which, if true, would have justified the defendant in withdrawing the business entirely from his premises. But the defendant did not act in that manner. It still permitted him to receive a portion of the business stipulated for, while it diverted the residue to the yards and pens erected and maintained by itself. If the complaint of the defendant concerning the manner in which the plaintiff carried on the business, was well founded in fact, it would have justified the defendant, even though the agreement was legally obligatory, in refusing to perform it on its part. The defendant would have been secured under that state of the ease, with the election of either continuing or discontinuing the performance of the stipulations resting upon it by means of the agreement. But it would have to do one or the other. It could not justify itself on that account, in diverting a portion of the business from the plaintiff, while it secured him the performance of the residue. Eor permitting him to continue in such performance, would, while that was done, constitute a waiver of the obligation arising upon the defective manner in which the plaintiff performed that part of the agreement resting upon him. Where one party is entitled to rescind an agreement, on account of the failure of the other party to perform it, he cannot rescind it in part and affirm it as to the residue; but must affirm or disaffirm it entirely. If he affirms it in part, his duty to continue its performance remains while he so affirms it, leaving him as a means of *254indemnity for the defective or imperfect performance of the other party, an action for damages only, and not a diversion of a portion of the consideration agreed to be supplied by the party not in fault. For this reason, the defendant, while it permitted the plaintiff to carry on the business in part, which it stipulated to supply him with, cannot justify itself in withholding the residue from him. In doing that it violated the agreement upon its part, which justified the plaintiff in the refusal to receive the portion he was still permitted to have. There was, therefore, a failure on the part of the defendant to perform the agreement which constituted the consideration for which the plaintiff conveyed the land and' erected the cattle yards and pens. And that failure entitled him to recover the value of what the defendant had received from him, and for which it had agreed and failed to supply him with this business. It is not the case of a rescission of the agreement by the plaintiff", in which he would be bound to restore, as far as he might be able to do so, whatever benefit bad been directly secured to him by the partial performance of the agreement by the defendant. But the case presented is one where the law allows him to recover the value of whatever the defendant has derived from him by his performance of the agreement, and which performance is to remain undisturbed, on account of its omission and refusal to perform what was the consideration for that performance. The equivalent which the defendant agreed to give cannot be awarded either directly or by way of damages, because the agreement providing for it is void on account of the omission to reduce it to writing. All that the courts can do in such a case is to allow the party not in default to recover the value of that which in the expectation that the agreement would be performed he has transferred to the defaulting party. This he may do, not on the ground that he rescinds the agreement which he has performed on his part, but on the ground that the law will imply a promise *255on the part of the defaulting party to pay the reasonable value of what he may have received, where his own stipulations are inoperative and void by reason of legal informality in the manner in which they were made. Ho legal obstacle would stand in the way of the party who has performed such an agreement, which would prevent him from rescinding it, and recovering what he may have parted with on the faith of it, where the other party could by that act be placed in the same situation he was in when the agreement was made. But he is not ordinarily obliged to take that course. To do that he would be required to restore what he himself had received by the partial performance of the other party. This, however, he is not required to do. The agreement to compensate him being void, be may, under the promise which the law will imply in his favor, recover such sum as together with the benefit secured to him by the partial performance of the defaulting party will remunerate him for the reasonable value of what that party may have received through his own performance of the terms of the void agreement. This principle is not only founded in good sense, but it also has the , sanction of several well considered and well established authorities. (Gillet v. Maynard, 5 John. 85. King v. Brown, 2 Hill, 485. Peck v. Burr, 10 N. Y. Rep. 294. Erben v. Lorillard, 19 id. 299.) And it clearly distinguishes this class "of cases from those relied upon by the counsel for the appellant, where an actual rescission of the agreement must be made by a restoration of what the party rescinding it may have received, before he can be permitted to recover the consideration that may have been parted with under it. They are cases where the action proceeded for the specific thing which the' party claimed'to be in default had received from the other party. The action in those cases was for the recovery of the consideration, while in this it is to recover the value of it in money. The same substantial results may follow in each class of cases,- but *256still there is a clear and well marked legal distinction between them. One proceeds upon a rescission of the contract, the other upon the affirmance of it as far as its performance has extended, united with the promise which the law implies against the party benefited to pay for that which he has received by means of such performance.
In this case, all that the railroad company received under the agreement from the plaintiff was the land which he conveyed to it. For as the court very properly held at the trial, it could not insist upon the performance of his covenant to build and keep the cattle yards and pens in repair, after it had withheld from him the consideration upon which that covenant was entered into. That was to be done for the accommodation of the business which the company was to take there, and it could be required no longer than the company supplied the plaintiff with the business it was contemplated he was to carry on by means of such yards and pens.
The yards and.pens themselves were erected on the plaintiff’s own land, and were owned by him. The defendant had no right or interest in them whatever, beyond the plaintiff’s obligation to appropriate them to the transaction of the business for which they were designed, as long as it supplied him with that business. When the defendant ceased to do that, even that obligation was at an end. And the yards and pens were the absolute property of the plaintiff, while these yards and pens were made to accommodate the necessities of the defendant’s business, the business to be carried on in and by means of them, was to be that of the plaintiff. And all its gains and emoluments belonged to him. It is true they secured important if not indispensable facilities to the defendant and the great Western Railway Company in the transportation of live stock, but the defendant obligated itself to compensate the plaintiff for such facilities in no other way than by the business it agreed to supply to him. And the *257agreement made for that purpose was void because not in writing. Under these circumstances no action can be maintained by the plaintiff for depriving him of that business, which was the means by which he expected to be compensated for the expenses incurred in erecting and maintaining the cattle yards and pens. In no other way was it contemplated that the defendant should reward him for the benefit secured to it by the plaintiff’s performance of the contract in this respect. The entire risk of the investment, as well as the losses arising out of it, or dependent upon the defendant’s performance of the stipulations resting upon it, was exclusively that of the plaintiff. If, from either cause, losses were experienced, they were solely those of the plaintiff, because he imposed no binding obligation on the defendant to protect him against them, either in whole or in part. To subject the defendant to such liability required some stipulation on its part of a valid and binding character, which it has failed to perform. And no stipulation relating to that is to be found outside of that part of the contract which was void by the statute of frauds. For this reason that part of the charge by which the jury were directed that they might allow the plaintiff damages for the diminished value of the use of the cattle yards and pens, occasioned by the refusal of the defendant to perform the contract requiring the stock to be taken to them, was erroneous. It virtually gave the plaintiff such damages as he sustained by reason of the non-performance of the contract on the part of the defendant, so far as such non-performánce resulted in diminishing the value of the use of the yards and pens. And the right to recover them is dependent entirely upon the validity of this part of the agreement. The recovery of such damages requires for its support a valid," binding agreement to supply the plaintiff with the business which it was agreed he should have to do at these yards and *258pens. And no such agreement exists in the case. These damages arose directly out of the breach of the defendant's contract, which this court has already held to be entirely void so far as it remained unperformed. The defendant received nothing from the plaintiff for which such damages can be given by way of compensation. The sole intent and object of them was indemnity for losses arising out of a failure on the part of the defendant to fulfill its void engagements. The recovery should have been limited to such damages as would compensate the plaintiff for what the defendant had received from him under the contract, which would include no part of the losses sustained by him on account of the defendant’s omission to furnish the business it agreed to supply him with.
[Erie General Term, November 18, 1867.The order denying a new trial should be reversed, and a new trial directed, with costs to abide the event.
Grover, Marvin, Daniels and. Davis, Justices.]