Under the old system, and prior to the decision in Smith v. White, (7 Hill, 520), it was well settled that the *463employment of an attorney prior to the rule of discontinuance entitled the defendant to costs, although the rule was entered before the defendant had in fact appeared. (Robinson v. Taylor, 12 Wend., 191; White v. Smith, 4 Hill. 166), and that a discontinuance under such circumstances could be treated by the defendant as a nullity, unless his costs were paid. The Oourt of Errors however reversed the judgment of the Supreme Court in White v. Smith, and overruled Robinson v. Taylor upon the language of the statute, (2 Rev. Stats., 615, § 16), which declared that in all actions in which the plaintiff would be entitled to costs upon a judgment rendered in his favor, if after the appearance of the defendant, such plaintiff should be nonsuited, discontinue his suit, &c., the defendant should have judgment to recover his costs. This rule has been recognized as applicable to the defendant’s rights to costs under the Code in Averill v. Patterson, (10 How. Pr. R., 87), but the learned justice who delivered the opinion in this case did not consider the difference between the existing and the repealed statutes.
There is no analogy between these statutes. The present statute, (Code § 304), provides as follows :—“ Costs shall be allowed of course to the plaintiff upon a recovery in the following cases,” &c. And by section 305 further provides as follows:—“Costs shall be allowed of course to the defendant in the actions mentioned in the last section, unless the plaintiff he entitled to costs therein.”
The plaintiff is not entitled to any costs on his own discontinuance of the action, and not in any other case except upon a recovery. There is nothing in the statute on the subject of the defendant’s appearance; on the contrary, section 305, already referred to, is peremptory in language—“ costs shall be allowed,” &c.—and contemplates, I think, costs to the defendant in all cases in which he has been served with process, and in which the plaintiff does not recover, excepting, however, the cases mentioned or referred to in section 306, in which this action is not embraced.
I think, therefore, that the defendant is entitled to costs, although the action be discontinued before his appearance is entered or perfected, provided, however, that said discontinu*464anee is ordered within twenty days after the service of the summons. The defendant is entitled to twenty days to answer, and during that period may employ an attorney and set about preparing his answer to the complaint served upon him, or if the action be commenced by summons, may employ an attorney to appear for him and to protect his rights. He is not in either case required to appear before the expiration of the time named, and if in either case he has employed an attorney within the twenty days, and no notice of the application for leave to discontinue be given, I think he may treat the discon tinuance as a nullity. If, however, the order of discontinuance be entered after the expiration of the twenty days allowed to appear or answer, it may be questionable whether, the defendant having waived his right to appear, the plaintiff may not dispose of the action as he thinks proper.
Ordered judgment with ten dollars costs of this motion, unless the plaintiff, within five days after service of this order, pays five dollars costs of discontinuance and five dollars costs of this motion, in which case the order of discontinuance entered by plaintiff is to stand as if made on application and on payment of costs.