This action was brought to obtain a decision from the court whether a certain lease, executed by the plaintiffs to the Vermont and Canada Railroad Company, was or was not void. The plaintiffs do not affirmatively allege that the lease is void, but they ask for a decision on this point, and a judgment that, if void, it be annulled, and they restored to their rights as before the lease was executed.
The defendants, the Vermont and Canada Railroad Company, demurred. The demurrer was sustained and the plaintiffs appeal.
The defendant, the Vermont and Canada Railroad Company, now move to dismiss the appeal, on the ground that, before and since the judgment on the demurrer, the plaintiffs accepted rent on the lease, and thus ratified it. The ground on which it is claimed that the lease is void is that it was one which the company had no power to make — ultra vires.
Without inquiring as to the effect which such a receipt of rent might have in some cases, it is enough to say that if the Ogdensburg and Lake Champlain Railroad Company had no power to make such a lease as the one in question, they had no power to ratify it by accepting rent. If it was beyond their corporate power to lease the road by a written instrument, then they could not make a void lease valid by receiving the rent upon it. This is not the case of an imperfectly executed contract, or one executed by a pretended agent.
The motion to dismiss the appeal shorild be denied, with $10 costs.
James, J., dissented.
Motion denied.
Note.—The following opinion delivered at special term in the foregoing action bears upon the question of service on non-resident corporations, and reaches a conclusion not in harmony with that in Barnett v. Chicago & Lake Huron R. R. Co., ante, page 358:
The complaint avers that the plaintiff is a corporation organized under the laws of the State of New York; that since August, 1865, it has been the owner of a railroad extending from Ogdensburg to Rouse’s Point, and that it operated the same for public use up to March 1,1870; that in February, 1Í370, an agreement in writing was entered into between said plaintiff, under proper authority from its directors, with the Vermont & Canada Railroad Company and the managers and trustees of the Vermont Central Railroad Company, attested by its vice-president, and under the hands and seals of J. Gregory Smith, Benjamin P. Cheney and Joseph Clark, as trustees, receivers and managers of said road. That said railroads, defendants, had no corporate powers in the State of New York, nor any special recognition of corporate powers therein. That before making said agreement, the Vermont Central Railroad Company had become insolvent, and the defendants, Smith, Cheney and Clark, had, by the courts of Vermont, been appointed trustees, managers and receivers *490thereof, and at the time of making said agreement, said Vefmont Central Railroad was insolvent and was held and controlled by or in the interest of said .trustees. That the. Central Vermont Railroad Company is a corporation created by the laws of Vermont, in November, 1872, with authority to assume and perform all the contracts of the trustees, managers and receivers of the Vermont Central Railroad Company and the Vermont and Canada Railroad Company, and that said Central Vermont Company claims to have succeeded to said agreement of 1870. That March 1,1870, said plaintiff, in pursuance of the aforesaid agreement, delivered the possession and control of its railroad to the said parties therein named, who received and still hold the same; and that said Central Vermont Company and John Schrier, claiming under said railroads, have exclusive possession and control of said Ogdensburg and Lake Champlain Railroad, receiving and enjoying its earnings. That all the defendants but Schrier are non-residents; that Schrier is superintendent and agent for the other defendants, and as such has the possession and charge of said road. That recently the claim has been set up by the people of the State of New York, through their attorney-general, that the aforesaid agreement of 1870 was beyond the corporate powers of the plaintiff, and was, and is, illegal and void; that the transfer under it, of possession of said road, with the right of operating the same as a public route of travel, was illegaLand unauthorized; and that such transfer and the cessation thereby and thereunder, for more than one year, - of the maintenance and operation of said road by the plaintiff itself, amounts in law to a suspension of the ordinary and lawful business of the plaintiff, and subjects it to a forfeiture of- its charter, etc., and that in January last, the people by their attorney-general commenced an action against this plaintiff, setting up the matters aforesaid and demanding judgment of forfeiture of its charter; which action is still pending. That from the time of making said agreement to the present the plaintiff has maintained its corporate organization, held elections, meetings of its directors, paid interest on its bonds and other current pecuniary obligations, and made dividends on its stock from moneys received under said agreement; that its road has been kept up and maintained for travel and transportation, and the public duties incident to the franchise have been performed and fulfilled by said defendants, and all the payments required by said agreement have been made. That said agreement of 1870 was entered into in good faith, upon the belief that parties thereto have the right so to do, and upon the advice of counsel upon whom they relied; that if the agreement be adjudged within the corporate powers of the plaintiff, and the surrender of possession and use of its road legal, the pecuniary result is not objectionable and plaintiff would be content therewith, but if said agreement was unauthorized or illegal, and subjects it to a forfeiture of its charter, it desires to be, relieved therefrom and restored to the possession of its road.
The court is then-asked to adjudge and determine whether said agreement and the transfer and delivery of possession ufider it, with its exclusive use, 'was unauthorized or beyond the corporate powers of plaintiff.
The defendants, the Vermont & Canada Railroad Company and the Central Vermont Railroad Company, appeared specially in the action for the purpose of objecting to the ju risdiction of the court, and for that purpose only, and each, severally, specially demurred to the complaint, because it appeared on the face thereof that the court had not jurisdiction of their persons.. The defendants, John Gregory Smith, BenjaminP. Cheney and Joseph Clark, sued as trustees, managers and receivers of the Vermont Central Railroad Company, and not otherwise made parties to the action, also appeared specially and solely for the purpose of objecting to the jurisdiction of the court, and severally demurred to the complaint, because it appeared on the face thereof that the court had not jurisdiction of the person of said defendants.
The defendant John Schrier demurred to the complaint, on the ground that it did not state facts sufficient to constitute a cause of action against him,
Wm. M. Evarts and L. Hasbr.ouck, Jr., for plaintiff.
E. C. James, for defendant.
Jambs, J. As to all the defendants, other than Schrier, the only question now in the case is as to the jurisdiction of this court over the persons of said defendants, for without such jurisdiction it can render no personal judgment against them.
*491It was urged that by interposing their demurrers the defendants had conferred on the court jurisdiction of their persons, and this would be true had the demurrers been upon any other ground; but being solely on-the ground that the court had not jurisdiction of their persons, and that they made a qualified appearance for the purpose of testing that question, and for no other purpose, it had no such effect. A defendant in an action has the right to appear specially for the purpose of testing the question of jurisdiction, and by so doing does not confer jurisdiction generally in the cause. Allen v. Malcolm, 12 Abb. (N. S.) 335; Sullivan v. Frazee, 4 Robt. 616; Seymour v. Judd, 2 N. Y. 464-468; McCormick v. Penn. Cen. R. R. Co., 49 id. 303-309; Cumb. Coal Co. v. Sherman, 8 Abb. 243.
The Code permits a defendant to demur on the ground that the court has no jurisdiction of his person when this fact appears upon the face of the complaint; and when it does not so appear, to take the objection by answer. Code, §§ 145-147. But such objection is not to be deemed waived, even if not taken by demurrer or answer (Code, § 148); much less is it to be deemed waived by an appearance for the sole purpose of raising it in the exact method provided by the Code. Sullivan v. Frazee, 4 Robt. 616.
This objection to the jurisdiction of the court does not mean that the suit has been irregularly commenced, but that the person named as defendant is not subject te the jurisdiction or order of the court. Nones v. Hope Mut. Ins. Co., 5 How 96; S. C., 8 Barb. 541. Hence the inquiry is not as to the irregularity of the proceedings by which service of the summons has been made, but whether the defendant is such a person as can be subjected by process to the court’s jurisdiction.
One over whose'person the court has no jurisdiction is not bound to wait until final judgment, and then seek relief by motion to set it aside. The Code gives him the right to present that contingency by pleading, and by appearing to exercise that right he does not waive it, orin any way impair the force of the objection. To hold otherwise would make the means provided for presenting that issue" destroy the issue itself. In my judgment the issue was properly taken by demurrer, and such demurrers present issues of law for the decision of the court. Code, § 249 ; King v. Poole, 36 Barb. 242-247.
An action against a foreign corporation is authorized by section 427 of the Code, but before the action can proceed or the court render judgment either in rem or in personam it must have jurisdiction of the property, or the person of the defendant. This is not a proceeding in rem, but an action against the persons of the defendants.
At common law, the courts of this State had no jurisdiction of the persons of foreign corporations, nor have our statutes provided any mode whereby the personal appearance of foreign corporations can be compelled. Such companies may be proceeded against by attachment, and if property is seized, judgment may be rendered against such property without a personal appearance by the defendant. It is only in cases of voluntary appearance that our courts can have jurisdiction of the persons of foreign corporations. McCormick v. Penn. Cent. R. R. Co., 49 N. Y. 303. As was said in Hulburt v. Hope Mut. Ins. Co., 4 How. 275, the service of a summons upon a president of a foreign corporation, who happens to be temporarily in this State and who does not voluntarily appear, does not give the court jurisdiction of the defendant for the purpose of rendering a personal judgment, and so of service by publication made xxnder the Code, § 135 ; either service must be regarded, for all practical purposes, as simply a statutory notice that proceedings are about to be instituted against the defendant’s property. An action against a foreign corporation is now, as a suit was formerly, a proceeding against its property only, unless there is a voluntary appearance by the defendant. Code, §§ 227 to 243, and 427 ; 2 R. S. 429. It was held in Brewster v. Mich. C. R. R. Co., 5 How. 183, that in a case where the service of the summons was made upon the proper officer of a foreign corporation, no attachment having been issued and no voluntary appearance by the corporation, the courts of this State did not get jurisdiction of the defendants so as to render a personal judgment. The extent of the power of the court, in such case,'is to subject the property and effects of such corporation within the Sthte, by a judgment in rem, to the payment of its debts, etc. Cumberland Coal Co. v. Sherman, 8 Abb, 243; McCormick v. P. C. R. R. Co., 49 N. Y. 303.
Therefore in an action by a resident of this State against a foreign corporation, this court cannot acquire jurisdiction of its person or legally render a personal judgment against it unless such corporation elect voluntarily to appear therein. As the complaint in this case shows the said defendants to be foreign corporations, and there not having been any vol*492untary general appearances therein, no jurisdiction of their pei^ons has been obtained and the demurrers of the said defendants are well taken.
As to the defendants, Smith, Cheney and Clark, they' are not sued as individuals, or for any act done as individuals, but as trustees appointed by the courts of another State over an insolvent corporation created by such State, and for acts done as trustees under such appointment. Jurisdiction over the persons of such trustees, for acts done in their capacity as such, must stand on the same footing as the foreign corporation which they represent. As such they constitute a quasi corporation foreign in all that relates to official acts or duty, and must be so treated by our courts whenever they decline our jurisdiction. In an action against them, for acts in their official relation, they may submit to the jurisdiction of our courts by a voluntary appearance, but if they do not the courts have no power to coerce their official personal appearance. Even as against a non-resident individual, our courts cannot acquire jurisdiction without a per sonal service of the summons within the State, or a voluntary appearance (Schwinger v. Hickok, 53 N. Y. 280), and personal service' in this State, on one of several foreign trusteés, will not confer personal jurisdiction over the persons of the body of trustees to which he belongs, nor over the person of the individual served, because not served as an individual) but as one of the several members of a board without personal claim against him. In fact the person of a foreign corporation, cannot be forced by the process of a court of this State, out of the State which created it, into its own jurisdiction; so of foreign trustees of foreign corporations for acts done in their representative characters. If the persons of. foreign trustees were subject to the jurisdiction of the courts of this State, for acts done as such, they might sometimes be placed in an awkward predicament. They are officers of the court appointing them, subject to its orders and authority; if subject to the jurisdiction of courts of other States, they might be abjudged to do acts which the court appointing them might not approve, or refuse to recognize, and punish them for doing. Foreign corporations and trustees of such corporations may sue in the courts of this State (Runk v. St. John, 29 Barb. 585), as a voluntary act. This is wholly upon the ground of comity, and therefore, our courts will not entertain the lien of a foreign assignee or receiver in opposition to a lien created by our own laws.
I think these demurrers well taken; that as shown by the complaint this court has not jurisdiction of the persons of said trustees, or either of them.
The puipose of this action is to avoid an agreement made by the plaintiff with the defendants, on the ground of want of power and authority in the plaintiff itself to enter into it. Can an action for such purpose be maintained by one of the parties thereto? This was questioned on the argument, and the point pressed "with considerable force, the counsel insisting that, as plaintiff had entered into the agreement of its own volition, submitted to it for four years, reaped its fruits and distributed them among its stockholders, it could not. now be heard to say that its act was unauthorized and illegal, even though such were the fact. Being in pari delicto, it could have no standing in court to be relieved from its own wrong. ^
It is a general principle of law that no court will lend its aid to a party who founds his cause of action upon an illegal agreement, and if, from the plaintiff’s own statement of the case, the cause of action appears to arise ex turpi causa, or by the transgression of law, or because unauthorized, he has no right to the assistance of the court, and this is not out of regard for the defendant, but because the court will not lend its aid to such a plaintiff. Courts of equity generally follow this rule of the common law, and refuse, to all parties concerned in illegal agreements or other illegal transactions, its aid for relief. The only exceptions are when the unlawful acts were against public policy, and in such cases affording no relief except such as public policy demanded, and no redress to either party further than such as might flow from the relief necessarily granted.
. This is not a case, as I shall hereafter show, calling for the interference of the court in plaintiff’s behalf on the ground of public policy, indeed, the aid of the court was not invoked on that ground.
The complaint, after stating the plaintiff’s corporate character, its ownership of the railroad, its continued existence as a corporation, the maintenance of its road for public use, the performance of all duties incident to the franchise," sets out the agreement of 1870, the delivery of possession and use and operation by defendants, its receipt and distribution of the money paid under said agreement, and expresses its satisfaction with the pecuniary *493arrangement, if legal, and then claims the transaction as unauthorized, and asks judgment of the court that it be declared void, and an order directing its return to said plaintiff, etc. The complaint further avers the defendant John Schrier to be the superintendent of said railroad, as agent, acting under the other defendants. It does not aver or show that Schrier has or claims any possession or control in his own right, or that he had any thing to do in any way with the agreement under which possession of said road was obtained.
From the complaint, fairly construed, it appears that he was simply an agent in possession for his principal. As such, he was neither a necessary or proper party. Code, § 118. Neither having or claiming either right or interest in the subject-matter of the controversy, a complete determination could be had without his being a party. He was not a tenant in possession. His was the possession of his principal, against whom a judgment for the possession of said road could be enforced. It was held in Garr v. Bright, 1 Barb. Ch. 157, that “A person could not be made party defendant on the ground of his being the agent of the party interested, where no specific relief was asked against him, and this complaint contained no allegation that he acted as such agent in relation to the transaction, or had an interestin or connection with the subject-matter of the litigation,” So in Boyd v. Vanderkemp, 1 Barb. Ch. 273, where an agent defendant made default, it was held erroneous to make a mere agent a party defendant in a suit for specific performance of a contract, and the court even refused to allow judgment to pass against him for costs, on the ground that he was improperly made a party. It would, therefore, seem that Schrier was not a necessary or proper party, and that as against him no cause of action is stated in the complaint.
But the more important question is, was the agreement of February, 1870, within the Corporate powers of the plaintiff? This is a question of much importance to the parties, and of great importance to the public at large.
Upon this question I shall quote from an opinion by Judge J. F. Redfield, given to the parties at the time this contract was made, furnished me on the argument.
He says: “The right to build, own and operate railways is not necessarily a corporate function; it might just as well be done by natural persons, but as it pertains to inter-communication in a State or nation, it is of a prerogative character, and cannot be exercised without the consent of the sovereign power, express or implied. Bank of Middleton v. Edgarton, 30 Vt. 182, 190. The English courts have held that a corporation created expressly for the purpose of operating a railway could not either assign or lease the same as a whole, either for a definite or indefinite period, without consent of the legislature, either express or implied.
“Although this opinion was reached with acknowledged reluctance and great doubt, it seems to have been acquiesced in there, and universally adopted in this country. The principle upon which it'has prevailed seems to be that the sovereignty of the State having conferred an important function, and in many respects of a prerogative character, upon these corporations, the trust thereby became strictly personal, and the State had the right to insist upon retaining the original guaranty thereby afforded for its faithful performance, at least until consent was given by some legislative act that it might be transferred to others. But these rules have naturally received a somewhat limited and strict construction. It was held by the English courts at an early day, that any mere traffic arrangement between different corporations forming a continuous line, although the effects were to give the entire use of one line to another company, and in return to guarantee a certain dividend on the stock of the company owning the line, as an equivalent for the benefit of the entire traffic, was not on that account objectionable, and did not require confirmation by any legislative act. This was decreed by a unanimous opinion of the Exchequer chamber (9 Exch. 542), and has never been departed from. It was regarded as a mere traffic arrangement with connecting roads, to consolidate the working of an entire line under one control, in order to secure greater efficiency and less expense. The result of this case and of all the cases upon this point is that a railway company has the right to make any contract for the use of its own line within its charter powers, and these charter powers are determined not only by the terms of its original charter but by all the general statutes of the State in force at the date of the charter, or which have been subsequently passed.”
In this case, as I have before said, no question is made as to the powers of the Vermont corporation, or the trustees and managers thereof, to make the agreement in question, or to the validity of the agreement in that State. The action is placed wholly on the plaintiff’s want of power.
*494It should be borne in mind that these railroads, plaintiff and defendants, are connecting roads, part of a connecting line, between the waters of the great west and the sea board. The agreement in controversy, which is made a part of the complaint, asserts that “said railroads form one connecting line of railroad traffic, from the foot of ship navigation on the great lakes at Ogdensburg to White River Junction and Windsor, Vermont, and that the traffic and business of each of said roads are so intimately connected, that it can be carried on and conducted to the greatest advantage of all concerned by having all the said roads under one management; that as a consolidation might ultimately be found desirable for the benefit of the public and of the stockholders of all the roads, as provided for by the act of 1869, a temporary arrangement is most desirable until it car oe clearly seen whether full consolidation, to the extent authorized by said act, will be advantageous,” etc.
These recitals sufficiently explain the objects and purposes of said agreement and show the motives which actuated its consummation.
At an early day the legislature of this State contemplated a union of connecting railroads, either by consolidation, leasing or otherwise, so as to form a continuous business line, under one management, whenever the owners deemed such a method most likely to aid in facilitating and in cheapening transportation. As early as 1839 (Laws of 1839, chap-218), the legislature of this State enacted that “it should be lawful for any railroad corporation to contract with any other railroad corporation for the use of their respective roads, and thereafter to use the same in such manner as may be provided by the contract. * ’ That is precisely what has been done in this case; the O. & L. C. R. R. Co. has contracted with defendants for the use of its road, and they are using it in the manner provided for in the contract. It is urged that these defendants are foreign corporations, and that said act does not include foreign corporations. It does not in terms say “foreign corporations,” but the language is broad enough to include all corporations; it says “any other corpora tion,” and as the greater always includes the less, the act should be so construed as to apply to all corporations that come together and are capable of forming a continuous line of railroad connection, whether all are located in this State, or one in this State and one in another.
The point is taken that this act is limited to corporations and does not reach this case, because the trustees and managers of an insolvent corporation formed one of the several contracting parties on one side. I cannot concur in this view. The terms of the act were used in a broader sense,-and include all or any railroad, whether owned by a corporation, or by one or more individuals; the roads and their use were the subject of consideration and enactment—not the owners.
The principle of union, or lease, or consolidation of railroads has, since 1839, been repeatedly recognized and provided for in subsequent legislative enactments in this State. In 1855, chap. 302, a statute was passed and re-enacted; in 1867, chap. 254, entitled “An act in relation to railroads held under lease,” and declaring that any railroad corporation created by the laws of this State, or its successors, now being the lessee óf the road of any other corporation, might take a surrender or transfer of the capital stock, etc.; and again in 1864, chap. 582, conceding the general principle, it was enacted by the second section, “that when the road of any railroad corporation should be leased to any other railroad corporation, or to any person or persons, such lessee should maintain fences, etc., thus distinctly recognizing the right of individuals to lease as well as corporations. In 1869, chap. 844, the act of 1867 was amended, requiring any railroad corporation, being the lessee of any other railroad, to make to the State engineer a report of such facts, concerning the operation of such leased road, as the lessors would otherwise be required to make, etc. This was followed by another statute in the same year, chap. 917, declaring that it may and shall be lawful for any railroad company or corporation organized under the laws of this State, or of this State and any other State, and operating a railroad or bridge, either wholly within, or partly within and partly without, this State, to merge and consolidate its capital stock’, franchises and property with the capital stock, franchises and property of any other railroad company or companies organized under the laws of this State, or under' the laws of this State and any other State, or under the laws of any other State or States, whenever two or more of the companies or corporations so to be consolidated shall or may form a continuous line of railroad with each other, or by means of any intervening railroad bridge or ferry
*495Thus is presented a series of legislation in this State, beginning in 1839 and continuing up to and including 1869, authorizing, recognizing and regulating the use of one railroad by another, partially or exclusively, by contract, lease or consolidation; and the operations of the many railroads in this State in that method since those enactments show that between them union and consolidation is the order of the day. The receipts and benefits have become too apparent now to be stayed; it is one of those steps of progress necessary to make these great thoroughfares of public travel and traffic meet the requirements of commerce and the emergencies of the age.
In my judgment, the act of 1839, within its fair scope and intention, authorized the plaintiff to make the agreement it did with the defendants, and that such authority is reiterated and enlarged in the act of 1869, it being but an amplification of the act of 1839, perhaps deemed necessary to cover such cases as these roads at Rouse’s Point, and the Great Western and New York Central at Niagara Falls. If right in this view, it follows that the agreement in question was not ultra vires.
The present tendency of judicial decision upon the powers of corporations to enter into contracts to promote the object of their incorporation is well set forth by Justice Potter in the recent case of Town of Middletown v. R. & O. R. R. Co., 43 How. 480. He says: “I think it will hardly be contended at this day that corporations can perform no act, and can make no contract, but such as the statute in express language authorizes. The con trary is true. They being invested with the powers of natural persons for the purposes specified, to a certain extent may enter into every contract to carry out that object, which is not in violation of some public law, or contrary to public policy.”
As above shown, the contract now in question, so far from violating any public law, is authorized by the statute of 1839 and 1869. It is also fully in accord with public policy as decided by the Court of Appeals in Merrick v. Von Santvoord, 34 N. Y. 208.
Judgment is directed for the defendants upon each of the several demurrers with costs to the defendant Schrier.