A desirable flexibility of the law frequently demands the construction here contended for in ways not always easily foreseen. Thus it is generally true that illegality if of a serious nature need notfpleaded. A court will of its own motion take notice of it if it appears in evidence, and deny relief to the plaintiff,17 and indeed will not allow a defendant to waive the defense, if he wishes to do so,18 Yet if the illegality was not serious or if public policy does not clearly require denial of relief the court may refuse thus to take notice of illegality which is not pleaded, but appears from the evidence given or offered.19 Such diversity of treatment would be inexplicable if all unlawful agreements were of necessity void.20

15 See, e. g., under the Statute of Frauds, supra, Sec.531. Consider also decisions cited infra, Sec. 1683, allowing recovery on a contract illegal for usury when entered into, after repeal of the usury statute.

16 In Ferguson v. Sutphen, 8 11I. 547, 573, the court said: "It does not follow because a statute declares a certain contract to be void, that either of the contracting parties can take advantage of it. A statute may declare a contract to be void, and still but one of the parties be guilty of its violation. Enactments of this character are often made for the purpose of protecting one class of men from the oppression and impositions of another class of men; and in such cases, the really guilty party is never allowed any relief under the statute, or permitted to set up the statute as a defence to relief sought by the other party. Such is the case with all laws, which declare usurious contracts to be null and void. The lender is never allowed to take advantage of the statute, because he is the guilty party; the borrower may do so, because he is not a particeps criminis. He is regarded as the victim of the usurer, and not in pari delicto. This principle applies to every contract declared to be void by the statute, in the making of which but one of the parties is in pari delicto. Browning v. Morris,

Cowper, 790; Williams v. Headley, 8 East, 378." See further as recognizing that contracts are not necessarily void in any true sense of the word because of illegality: Fennell v. Ridler, 5 B. & C. 406, 408; Ewell v. Daggs, 108 U. S. 143, 2 Sup. Ct. 408, 27 L. Ed. 682; Hartford Fire Ins. Co. v. Chicago, etc., R. Co., 70 Fed. 201, 36 U. S. App. 152, 30 L. R. A. 193, 17 C. C. A. 62, aff'g 62 Fed. 904, aff'd in 175 U. S. 91, 44 L. Ed. 84, 20 Sup. Ct. 33; Doney v. Laughlin, 50 Ind. App. 38, 94 N. E. 1027; John v. Bailey, 45 Iowa, 241; Chesapeake & O. R. Co. v. Maysville Brick Co., 132 Ky. 643,116 S. W. 1183; Myers v. Meinrath, 101 Mass. 366, 3 Am. Rep. 368; Smith v. Bean, 15 N. H. 577; Jenness v. Simpson, 84 Vt. 127, 78 Atl. 886.

17 Oscanyan v;. Arms Co., 103 U. S. 261, 26 L. Ed. 539; Carter-Crumo Ce. v. Peurrung, 86 Fed. 439, 440, 58 U. S. App. 338, 30 C. C. A. 174, aff'd 99 Fed. 888,40 C. C. A. 150; Alabama Ac. Ins. Co. v. Mobile etc. Ins. Co., 81 Ala. 329, 334, 1 So. 561; Sheldon v. Pruess-ner, 52 Kans. 579, 589, 35 Pac. 201, 22 L. R. A. 709; Chaflin v. United States Credit System Co., 165 Mass. 501, 52 Am. St. 528; Heffront;. Daly, 133 Mich. 613, 95 N. W. 714; Drake v. Lauer, 93 N. Y. App. Div. 86, 86 N. Y. S. 986; Barry v. Mulhall, 162 N. Y. App. Div. 749, 147 N. Y. S. 996; Cansler v.