Insofar as pertinent, the above paragraphs of the proprietary lease and by-laws provide that original purchasers of the cooperative's shares, such as plaintiff, need the consent of only the cooperative's managing agent in order to sublet their apartments, which consent is not to be unreasonably withheld, and that if such consent is withheld, an original purchaser can apply for consent to the Board of Directors or shareholders as provided in paragraph 15 of the proprietary lease. The latter paragraph prohibits all non-original purchasers from subletting their apartments without the consent of the Board or a super-majority of the lessees, which consent can be withheld for any or no reason. Plaintiff claims that the managing agent unreasonably withheld his consent and seeks, inter alia, an injunction compelling its consent.
There is no question that lease paragraph 38 and the related by-law provision violate Business Corporation Law § 501(c) by giving original purchasers more favorable subletting rights than non-original purchasers (see Wapnick v. Seven Park Ave. Corp., 240 A.D.2d 245, 246-247). The only question is whether the cooperative waived or should be estopped from asserting the illegality of such preferential treatment. We hold not. The defense of illegality, i.e., that a contract is void as against public policy, is not waived by a failure to affirmatively plead it in an answer, and will be entertained without reference to the state of the pleadings (Attridge v. Pembroke, 235 App. Div. 101, 102-103; see Carlson v. Travelers Ins. Co., 35 A.D.2d 351, 353-354), at least where its interposition does not take the plaintiff by surprise (CPLR 3018[b]; cf. Rogoff v. San Juan Racing Assn., 54 N.Y.2d 883). Here, plaintiff could not have been surprised by the cooperative's assertion of section 501(c) in its motion for summary judgment where such had been raised by the cooperative in a prior motion for summary judgment that was denied with leave to renew upon completion of disclosure.
Nor can waiver or estoppel based on the cooperative's conduct be relied upon to enforce corporate documents that are contrary to public policy (see Millington v. Rapoport, 98 A.D.2d 765, 766). Thus it does not avail plaintiff that she relied on the sponsor's offer of special subletting privileges in buying the apartment, that the cooperative learned of her intent to sublet the apartment when she purchased a second larger apartment in the building with her husband, that the cooperative is continuing to permit subletting by other original shareholders and that the cooperative is itself subletting an apartment. In this regard we also note the "no waiver" clause in the proprietary lease (see Katz v. 215 W. 91stSt. Corp., 215 A.D.2d 265, 267).
THIS CONSTITUTES THE DECISION AND ORDER OF THE SUPREME COURT, APPELLATE DIVISION, FIRST DEPARTMENT.