
    MINNESOTA, D. & P. RAILWAY COMPANY, Appellant, v. WAY et al., Respondents.
    (148 N. W. 858.)
    1.' Contracts — Railroads—Town Sites on Right of Way, Contract for — Illegality—“Contrary to Good Morals” — 'Public Policy.
    A contract between a railn&ad company and one who, in consideration of the right, given him thereunder, to purchase and lay out town sites upon the contemplated route of the road, at such points .as. the chief engineer of the railroad company should designate, agreed to secure at his own expense and convey to said company the necessary right of .way and sufficient depot grounds, is without consideration and illegal and void, both as against public policy, and as being “contrary to good morals,” under Civ. Code, Sec. 1271.
    
      2- Contracts — Illegality—Consideration—Railroad Right of Way and Interest in Town Sité Sales — Ultra Vires — Trust Duties of Railroad.
    Such a contract, under whose spirit and intent secret inside advance information would be imparted by the railroad com'pany to respondent as to points where stations and depots were to be located, thereby enabling him to purchase, in advance of third persons, lands for town sites as designated by the chief engineer, and to indirectly deter others from so doing, was in. conflict with the trust duties the railroads owed the public, and was therefore ultra vires, illegal, and void.
    3. Contracts — Both Illegal and Ultra Vires — Parties in Pari Delicto —Estoppel.
    A contract between a railroad company and another, which was not only ultra vires but void for illegality, cannot be given validity through any principle of estoppel; and, the parties being in pari delicto, courts will not adjudicate rights thereunder.
    (Opinion filed October 6, 1914.
    Rehearing denied Dec. 8, 1914.)
    Appeal from. Circuit Court, Codington County. Hon. Cari, G. Sherwood, Judge.
    Action by the Minnesota-, Dakota. & Pacific Railway Company against Thomas Way and others, to recover a money judgment under a contract between plaintiff and the defendant Thomas Way, and upon a collateral contract -between defendant Thomas Way and other defendants, and the 'plaintiff, to secure performance of the principal contract; and for other relief. From a judgment for defendants, upon sustaining demurrers to the complaint, plaintiff appeals.
    Affirmed.
    
      W. H. Bremner, and Case & Cáse, for Appellant.
    
      Lancaster, Simpson & Purdy, and J. G. McFarland, for Respondents.
    (1) Under point one of the opinion, Appellant cited;
    English v. Carleton, 24 S. E. 127; Fixley v. Gould, 13 Ill. Appeal, 565; S. R. & St. P. R. Co. v. Spafford, 41 Iowa, 292; McGowan v. Phough, 20 L. R. A. (N. S.) 800; McClure v. Missouri River F. S. & G. Ry. Co., 9 Kan. 373; Perriman v. Trustees of Cincinnati S'. R. Co., 77 Ky. 755; Cal. B. & O. & Cr..Co. v. Roseman, 41 Ohio State, 573; Texas & St. L. R. Co. v. Robar, 48 American Report, 216; E. N. A. Co. v. Sumner, 5 N. E. 404 (Ind.); 9 Cyc. 481, 483; S. & St. E. Ry. Co. v. Robar, 48 Am. Reports, 268.
    Respondents cited:
    Central Transportation Company v. Pullman’s Car Company, 139 U. S., p. 24; Jacksonville Railway v. Hooper, 160 U. S., p. 514; Dinsmore v. E. C. & E- Ry. Co., 2 Fed. 465, 468.
    (2) Under point two- of the opinion, Appellant cited:
    
      Civ. Code, Sec. 488, par. 2; Cyc. Yol. 33, p. 71; Jacksonville,' etc., Railroad Company v. Hooper, 160 U. S. 514.
    Respondents cited:
    Central Transportation Company v. Pullman’s Car Co., 138 U. S. 24; Waldo v. The Chicago, St. Paul & Fond du Lac R. R. Co. et al., 14 Wis. 625; Civ. Code, Sec. 488, subd. 3; Case v. Kelly, 133 U. S'. 21; Pacific Railroad Company v. Seely, 45 Mo. 212, 100 Am. Dec. 369.
    (3) Under point three of the opinion, Appellant cited:
    Cyc. 10, 1156; Kadish v. Garden City (Equitable Loan & Building Assn., 38 N. E. 236;' Lurton v. Jacksonville Loan Assn. (Ill.) 58 N. E. 218; Clarke v. Olson (N!. D1.) 83 N. W. 519; Bloomington Mutual Life Benefit Association v. Blue, 11 N. E. 331; Elliot on Railroad's, Vol. 2, Secs. 369, 378.
   McCOY, J.

Appellant, who- was plaintiff below, is a railway corporation organized und’er the laws of this state. There are two alleged causes of action set out in the complaint, to each of which demurrer was interposed on the ground that the facts stated were not sufficient to constitute a cause of action. The demurrers were sustained, and plaintiff appeals.

By the first alleged cause of action it appears, in substance, that in January, 1906, plaintiff was about to construct a certain line of railway in a westerly direction from- the city of Watertown across this state, and that it entered into a contract with defendant Thomas A. Way, whérein and whereby he promised and agreed, at his own expense, to secure and convey and transfer, free of in-cumbrance, iby good title, to' plaintiff, between certain designated points, all the necessary right of way and depot grounds sufficient for the construction and operation of said contemplated railway, in consideration of the agreement that plaintiff would permit said Way to purchase and lay out town sites upon and along said contemplated line of railway, between said designated points, at such ■points as the chief engineer of said railway company should designate ; that plaintiff performed said contract on its part, but that said Way has failed to purchase and convey to plaintiff a large part of said right of way and depot grounds, and by reason thereof plaintiff was compelled to, and did, expend large stated sums of money in itself securing such right of way contracted to' be secured by said Way; that said Thomas A. Way„ to secure the faithful performance of said contract, entered into a bond, with others of the respondents as sureties; and that there has been a breach in the conditions of said bond to plaintiff’s injury.

By the second alleged cause of action it, in substance, appears that under said contract alleged in 'the first cause of action, and upon the same consideration, said Thomas A. Way, along portions of said contemplated line of railway, agreed to purchase at his own expense lands for town sites, to lay out and to plat into lots and blocks such towns at such points as the chief engineer of plaintiff should designate; that said Way should sell and dispose of said lots and blocks, and that when so sold the entire proceeds arising from such sales, after deducting the actual cost of the land and platting and 5 per cent, commission for sales, should be divided between plaintiff and said Way; that for the purpose of facilitating the purposes of said contract the said Way caused to be organized the defendant Dakota Town Lot Company; that said Way and said town lot company secured real estate at certain designated stations along said line of railway in' the counties of Codington, Clark, and Day, and platted the same into lots and blocks, and made many sales of such lots and blocks, and has accounted to plaintiff for only a portion of its share of the proceeds of such sales, and that there is still due and unpaid to plaintiff large sums of money by reason thereof, and demand has been made upon defendants for payment which has been refused, and that by reason thereof another breach of the conditions of said bond exists to plaintiff’s injury.

It is contended by respondents that the said contract, which constituted the basis of said alleged causes of action on the part of plaintiff, is wholly without consideration and nudum 'pactum, on the ground that said contract is illegal and void as-being against public policy. We are constrained to the view that respondents are right in this contention. The statute of this state (section 1271, Civ. Code) provides:

“That is not lawful which is (1) Contrary to an express provision of law; (2) contrary to the policy of express law, though not expressly prohibited; or (3) otherwise contrary to good" morals.”

It is not always easy to' define just what facts will constitute “contrary to good morals” within the meaning of this statute; but every case must stand generally upon its own peculiar facts and circumstances.

Public Service corporations, such as railway companies, are charged with a trust, and owe a duty to the general public in the' matter of the location of stations and depots, which duty is to so locate such stations and depots as will best serve the public interests ; and any contract entered into by such corporations- which has a tendency to interfere or come in conflict with the full and proper exercise of such trust duty will be an illegal contract and against good morals, within the meaning of the statute. In Halladay v. Patterson, 5 Or. 177, it was held that a railway company is a quasi public corporation, and that the public has an interest in the location of their lines of road and depots, and that an agreement which tends to lead persons charged with the performance of trusts or duties for the benefit of others, to violate or betray them, will not be enforced. This decision is recognized as one of the leading authorities upon this proposition. Elliott, Contracts, §§ 750, 751. The following from Cyc. -is a good exposition of the rule:

“If an agreement binds the parties or either of them, or if the consideration is to do something opposed to public policy, it is illegal and absolutely void, however solemnly made. If a court should enfoixe such an agreement it would employ its functions in undoing what it was created' to do. It is not easy to give a precise definition of public policy. It -is perhaps correct to say that public policy is that principle of .law which holds that no person can lawfully do that which has a tendency to be injurious to- the public, or against the public good, which may be designated, as it sometimes has been, the policy of the law or public policy in relation to the administration of the law. Where a contract belongs to this class, it will be declared void, although in the particular instance no injury to the public may have resulted. In other words, its validity is determined by its general tendency at the time it is made, and if this is opposed to the interests of the public it will be invalid, even if the intent of all the parties was good, and no -injury to the public would result in the particular case. The test is the evil tendency of the contract, and not its actual injury to the public in a particular instance. Thus an agreement for a pecuniary consideration made by a railroad company for the location of a station or depot at some particular place is void, although the location in the particular case may be advantageous to the public. An agreement to influence legislation is void, although the legislation sought may be clearly beneficial. An agreement to influence appointment to office is void, although the intent may 'be to secure the best qualified person. The law looks to the general tendency of such agreements, and it closes the doors to temptations by refusing them recognition in any of its courts.” 9 Cyc. 481-498.

The fair and reasonable inference to' -be drawn from the spirit and intent of the contract set out in the complaint was that, as consideration for the said Way securing and conveying to appellant free of cost a right of way on .which to' construct its line of road, it would secretly impart to him inside advance information as to the points where stations and depots were to- be located on said contemplated line of railway, to the end tiiat said Way might, in advance of all other persons, purchase the lands for town sites at such points as the chief engineer of the road should designate, and that appellant would protect him. by erecting depots and establishing stations at such points as he might purchase such lands for town-site purposes. The direct tendency of this contract was to cause the location of stations and depots at such points as best conserved the pecuniary interests of said parties thereto. Thereby the appellant secured its right of way and an interest in the proceeds of the sales of certain town lots. Thereby all other persons who might have desired to locate town sites along said line were indirectly deterred from so doing. The dickering and speculating in town-site properties is not within the scope of the authority of railway corfipanies organized under the laws of this state. The securing by appellant of its right of way and an interest in the proceeds of said town-site sales by this method was in direct conflict with the-trust duties the appellant owed to the general public. It seems to be a settled policy of the law to remove such opportunities and temptations by refusing to take cognizance of or enforce such contracts. Therefore, we are of the view that the contract which forms the basis of this action was without consideration, ultra vires, and illegal and void. The appellant had no legal authority to “permit” that which constituted the consideration for this contract. It was an illegal consideration, which, in effect, was no consideration. Many authorities sustain this view, among which are the following: Williamson v. C., R. I. & P. Ry., 53 Iowa, 126, 4 N. W. 870, 36 Am. Rep. 206; Reed v. Johnson, 27 Wash. 42, 67 Pac. 381, 57 L. R. A. 404; Western U. Telegraph Co. y. U. P. Ry. (C. C.) 3 Fed. 1; Woodstock v. Richmond Co., 129 U. S. 643, 9 Sup. Ct. 402, 32 L. Ed. 819; Bestor v. Wathen, 60 Ill. 138; St. Louis Ry. v. Mathers, 71 Ill. 592, 22 Am. Rep. 112 ; Pac. Ry. v. Seely, 45 Mo. 212, 100 Am. Dec. 369; Central Trans. Co. v. Pullman Car Co., 139 U. S. 24, 11 Sup. Ct. 478, 35 L. Ed. 55; Page on Contracts, § 416; Elliott on Contracts, §§ 75°. 751•

Appellant contends that” notwithstanding the contract might have been ultra vires and void, respondent, having received the full benefits thereunder, is now estopped to assert the invalidity thereof. The contract here involved was not only void by reason of its being ultra vires, but it was also void on the ground of illegality. There is a marked distinction between contracts which are void merely by reason of being ultra vires and contracts which-are void by reason of being both ultra vires and illegal. Page-on Contracts, § 506; Elliott on Contracts, § 645. Validity cannot be given to an illegal' contract through any principle of estoppel. As between parties in pari delicto, the courts will leave them where it has found them. Courts will not adjudicate rights under illegal contracts. Reed v. Johnson, supra; Williamson v. Ry. Co., supra; Page on Contracts, § 507.

The judgment and order appealed from are affirmed.  