This matter is presented under Rule on Appeal 55 (2) (3), 34A Wn. (2d) 59, 60, upon exceptions of the *503state of Washington, respondent-intervener, to the cost bill of appellants.
Plaintiffs (appellants) commenced this action against the Yakima county assessor, treasurer, auditor, and certain school districts of Yakima county. They prayed for a declaratory judgment that chapter 253 of the Laws of 1955, p. 1035, was unconstitutional and asked for an injunction against collection of taxes authorized by the act.
Pursuant to RCW 7.24.110, which provides that
“. . . if the statute ... is alleged to be unconstitutional, the attorney general shall also be served with a copy of the proceeding and be entitled to be heard,”
the attorney general accepted service of the summons and complaint. The purpose of this provision is to protect the public, should the parties be indifferent to the result. The state is interested in the constitutionality of its statutes as they affect the public welfare. See Parr v. Seattle, 197 Wash. 53, 84 P. (2d) 375 (1938).
Upon petition, the state was permitted to intervene in the action and did so, urging the constitutionality of the legislation.
The trial court sustained a demurrer to the complaint and dismissed the action. Upon appeal to this court, wherein the state appeared as respondent-intervener, the judgment of dismissal was reversed, and the case remanded, with instructions to overule the demurrer. Clark v. Seiber, 48 Wn. (2d) 783, 296 P. (2d) 680 (1956).
The state challenges the taxation of costs on appeal against it.
The right to court costs is a substantive right and a matter of statutory regulation. Platts v. Arney, 46 Wn. (2d) 122, 128, 278 P. (2d) 657 (1955).
Just as a sovereign cannot be sued without its consent, and then only in the manner and to the extent provided by statute (American Steel & Wire Co. of New Jersey v. State, ante p. 419, 302 P. (2d) 207 (1956)), so also the state is immune from judgment for court costs unless there is express statutory authority permitting such a judgment *504against it. State ex rel. Carroll v. Gatter, 43 Wn. (2d) 153, 160, 260 P. (2d) 360 (1953), and cases cited.
RCW 4.84.170 provides:
“In all actions prosecuted in the name and for the use of the state, . . . the state . . . shall be liable for costs to the same extent as private parties.”
The present action was not “prosecuted in the name and for the use of the state”; therefore, unless statutory authority for a judgment of costs on appeal against the state can be found elsewhere, the state’s exceptions to the cost bill must be sustained.
In Washington Recorder Pub. Co. v. Ernst, 1 Wn. (2d) 545, 97 P. (2d) 116 (1939), we held that RCW 4.88.260 (Rem. Supp. 1941, § 1744, which appears substantially as Rule on Appeal 55 (1), 34A Wn. (2d) 58, as amended December 14,1953, effective March 1, 1954) and RCW 4.84.190 (Rem. Rev. Stat., §493),
“. . . cannot be employed to furnish express statutory authority for the granting of costs against the state.” (p. 550) (Italics ours.)
One .of the causes of action in the instant case is under the declaratory judgment act, which provides:
“In any proceeding under this chapter, the court may make such award of costs as may seem equitable and just.” RCW 7.24.100.
This section of the statute cannot be interpreted as express statutory authority, permitting the court to enter judgment for costs against the state, unless the action for a declaratory judgment be prosecuted “in the name and for the use of the state.” RCW 7.24.100 relates only to costs in cases between private individuals, unless the state is liable for costs by reason of RCW 4.84.170.
It follows, that when the state intervenes in a declaratory judgment action which attacks the constitutionality of a statute, the state is not liable for court costs.
We find the exceptions of the state of Washington, respondent-intervener in this action, to appellants’ cost bill *505on appeal are well taken, and no judgment for said costs against the state should be entered.
It is so ordered.
Mallery, Finley, and Rosellini, JJ., concur.