Opinion by
Orlady, P. J.,
The appellants are reputable members of the bar of Allegheny County, who were employed by the board of school directors of Mount Washington sub-school district to test the constitutionality of an Act of Assembly of May 18,1911, P. L. 309, called the School Code, which by its terms terminated their office in November, 1911, when the code became operative and by which they were expressly forbidden to contract for any new property, (section 2811), that power being reserved to the directors *186to be selected in accordance with the code. A citizen and taxpayer of the county filed a bill on June 3, 1911, to restrain the school board from expending money in the purchase of a site for a new school building, which they were expressly forbidden to do by the new code, and prayed for an injunction. The defendants in that action, by these plaintiffs, demurred on several grounds, all of which attacked the constitutionality of the act in question. The demurrer was overruled, the injunction granted, and an appeal was taken to the Supreme Court, and the decree of the county court was affirmed: Minsinger v. Rau, 236 Pa. 327. This action is brought in the county court of Allegheny County to recover $1,000 with interest, from July 1, 1912, and founded upon the contract of employment with the sub-school district to defend it in the equity suit above mentioned.
The plaintiffs represented the sub-school district as counsel from the filing of the bill through all the proceedings to the final decree of the Supreme Court, No fair-minded person can dispute that they have rendered valuable services, nor that the amount of their claim is reasonable. The only question is, are they entitled to recover against this defendant? However interesting the question was from the standpoint of the sub-school district, the result of the litigation shows that it was unnecessarily defended. But whether correctly decided or not, it does not determine the liability of the present defendant. The office held by the directors of the sub-school district was created by the legislature, and was an agency of the Commonwealth. This phase of the question is fully considered and disposed of in Minsinger v. Rau, supra. There was no requirement, actual or implied, under the former law making it the duty of the sub-school district to take the action it did. The legislative will was declared on May 18, 1911; the challenge to the authority of the school board was made June 3, 1911, when the bill in equity was filed. The directors could in perfect good faith have accepted the mandate *187of. the legislature in determining their duty rather than to defy it. In making defense in the equity proceeding, they were volunteers whose term of office expired in November, 1911, before which time there could have been no reasonable hope to have the disputed question settled in due course of law, nor could the work they contemplated to do in the selection of a school site be concluded before the code became operative. Their challenge to the constitutionality of the law was wholly outside of their duties as school directors, and any expense incurred by them was not by reason of a legislative obligation of the board, for which this defendant in law or equity is bound to answer. This was the judgment of the county court to which this action was originally brought and was affirmed by the Court of Common Pleas on petition for an appeal from the judgment, which appeal was refused in a convincing opinion filed. The only right to act as school directors was given through legislative enactment, and on the repeal of the earlier acts, by substituting the school code therefor, the same authority had the same power to depose, that had the right to elevate. The holder of an office has an undisputed right to contest the validity of legislation which ousts him. That is personal to himself. The will of the public is voiced by the legislature, and he who raises the contest assumes the burden of establishing his right, and the burden of costs, expenses, etc., are incident to that contest. He has no vested right to an office created by the legislature, and independent of the legislative will, the public had no interest in continuing these particular persons as directors of this sub-school district.
“Expenses incident to the performances of a duty enjoined and compensated are one thing; a power to bind the county implied in the grant of another power, because the latter could not without the former be carried out, is a very different thing”: Fry v. Berks Co., 38 Pa. Superior Ct. 449. The old board of directors of the sub-district had no power to make these defendants liable for *188professional services in sucb a contest. The directors were exercising powers delegated to them by law, and only in the exercise of such powers, acting exclusively in their official capacities as the immediate representatives of the public and purely in its behalf, could they bind the public. The prohibition against the selection of a school site was distinct and controlling. They acted as private citizens and not as the board of sub-school district. The fact that the school board did not initiate the equity proceedings but volunteered to defend, is not material. They elected to make the contest, and through their action this claim arises. The statute provided that all the assets of the sub-school districts should pass to the new one named, which was made liable for all the valid debts of the old school district, and only such as were valid obligations can be exacted of it. See Bechtel v. Fry, 217 Pa. 591; Fry v. Berks Co., 38 Pa. Superior Ct. 449; Arnold’s Est., 252 Pa. 298; Commonwealth v. Moir, 199 Pa. 534.
The judgment of the court below is affirmed.