The 3d and 4th objections taken to the? legality of the recovery below, are equally well founded. The contract proved, varied from the contract laid, inasmuch as the contract proved was, that the testator was to' pay for all the land included in the road, and the contract as laid was, that he was to pay for one half. This variance was material and fatal. A contract must be proved as laid, and the plaintiff cannot give in evidence an entire contract, relating to two subjects, when he declares for one. (1 Ld. Raym. 735. 1 Term Rep. 240. 1 East, 1. 1 Campb. N. P. 361.) The contract as proved was, that the testator was to pay, not only for the land included in the road, but for other lands in possession of the testator, and claimed by Morrell. This was1 part of the same contract, and this last part was void by the statute of frauds ; and if part of one entire contract be illegal and void, the whole is void. (Crater v. Beckett, Term Rep. 201.) The judgment below must be reversed.