after stating the case. The only question therefore before us is as to the correctness of this ruling. We are not required to decide upon the redress which the plaintiff may have against those who displaced him, or the corporation for which they professed and undertook to act in disregarding the conditions of the contract, as to the term of service and rate of compensation, involved in the ordinance in force, and entering into the contract when the election was accepted. Nor is it necessary to consider and determine the legal effect upon the defendant’s right to the office, as the appointee of the stockholders, de facto if not de jure, representing the corporation by virtue of an unconstitutional enactment in making the appointment.
The principle governing in such cases is clearly laid down in the cases of Ellis v. N. C. Inst. for Deaf, Dumb and Blind, 68 N. C, 423, and in Norfleet v. Staton, 73 N. C., 546, with a mere reference to which we are content, for the reason that the ruling under review is entirely independent of those decisions.
The inquiry is this: Can the plaintiff recover the salary or fees received by the defendant for personal services rendered as chief engineer to the corporation? Has the defendant taken and converted to his own use moneys belonging to the plaintiff, and for which the action for money had and received will lie ?
We concur in the view taken by His Honor and for the satisfactory reason he assigns. The controversy does not hinge upon the meaning given to the words, “ office and officer,” as designating corporate agencies of a higher grade than those denominated employees who are serving their employers under contract.
But is the office of chief engineer of a railroad corporation, created by itself and for its own convenience, such an office as entitles one who has been displaced to recover its possession from the incumbent, and has he a vested estate *239in it with the right to all its emoluments and fees by whomsoever received as compensation for his own personal services ? The subject has been heretofore before the court, and the following have been held to belong to this class:
1. A tax-collector. Patterson v. Hubbs, 65 N. C., 119.
2. The presiding officers of the two houses of the legislature in exercising a power conferred upon them as such to appoint proxies and directors in corporations in which the state has an interest. Clark v. Stanley, 66 N. C., 59; Howerton v. Tate, 68 N. C., 547.
3. The directors of the asylums for the Insane and the Deaf, Dumb and Blind, of the Penitentiary, and the trustees of the University. Nichols v. McKee, 68 N. C., 429; Welker v. Bledsoe, Ib., 457.
4. The president of this railroad who brought his action and it was sustained in Howerton v. Tate, supra.
These cases come within the purview of section 366 of the Code which authorizes the Attorney General “ to bring an action in the name of the people of the state upon Ms own information or upon the complaint of any private party against the parties offending, when any person shall usurp, intrude into or unlawfully hold or exercise any public office, civil or military, or any franchise within this state, or any office in a corporation created by the authority of this state.” It is manifest, as the action may be instituted by the Attorney General “ upon his own information,” as well as “ upon the complaint of any private party,” that the act has reference to such usurping occupants as are exercising public functions or conferred franchises, wrongfully, and is confined to an office which, as is said in Nichols v. McKee, “ is a part of the government and part of the state polity,” and to an officer “who takes part in the government.” An office, such as to properly come within the legitimate scope of a quo warranto information, may be defined,” says a recent author, “ as a public position to which a portion of the *240sovereignty of the country, either legislative, executive or judicial, attaches for the time being, and which is exercised for the benefit of the public.” High Ex. Leg. Rem., § 620.
“ The three tests to be applied in determining whether an information will lie,” are in the words of the same author; “ first, the source of the office; second, its tenure; and third, its duties. The source of the office should be from the crown or sovereign authority, either by charter or legislative enactment; its tenure should be fixed and permanent, and its duties should be of a public nature.” So it has been held that an information will not lie to remove officers of a railroad com» pany who hold office under an election of the directors, as these are merely agents or servants of the company removable at the will of the appointing power. People v. Hill, 1 Lans. N. Y., 202. In Burr v. McDonald, 3 Gratt., (Va.) 215, the court declare that the officers of a joint stock company created for private purposes have no franchise in their offices, and are removable during the term for which they are appointed, when found to be incompetent or faithless.
The plaintiff’s counsel insists that inasmuch as the power to make all necessary by-laws, rules and regulations is vested in the company by its charter, and the stockholders have under this authority created and declared the office, limiting its duration and determining the salary, and its duties concern the public, the office partakes of a public nature and the same remedy should be afforded to the ejected incumbent to regain possession.
The right to conduct and carry on its business and to constitute the necessary agencies for that purpose is not a delegation of authority to make one of its agents a public officer. The company is essentially a private corporation, its outlays and emoluments private property, but the road when constructed becomes a public highway, and hence land may be taken from an unwilling owner upon making *241compensation to him. R. and G. R. R. Co. v. Davis, 2 Dev. & Bat., 451.
The true test of a public office seems to be that it is parcel of the administration of government, civil or military, or is itself created directly by the law making power.
It is only such as can avail themselves of the remedy by action under the provision of the Code superseding the former method of procedure by information in the nature of a quo warranto to recover possession of the office from which they may have been ejected, that can maintain the suit for the recovery of the fees and emoluments which the usurping intruder has wrongfully received.
We therefore find no error in the record and affirm the jpdgment.
No error. Affirmed.