
252 N.W.2d 872 (1977)
STATE of North Dakota, Plaintiff and Appellant,
v.
L. S. HANSON, a/k/a Leonard S. Hanson, Defendant and Appellee.
Cr. No. 584.
Supreme Court of North Dakota.
April 25, 1977.
David L. Peterson, Sp. Asst. Atty. Gen., Bismarck, for plaintiff and appellant State of North Dakota.
Kermit Edward Bye, Vogel, Vogel, Brantner & Kelly, Fargo, for defendant and appellee.
VOGEL, Justice.
Although in form only a motion to dismiss an appeal, the matter before us involves questions of considerable importance.
The appellee, a sheriff, was charged with the crime of reckless endangerment, under Section 12.1-17-03, N.D.C.C.:
"A person is guilty of an offense if he creates a substantial risk of serious bodily injury or death to another. The offense is a class C felony if the circumstances manifest his extreme indifference to the *873 value of human life. Otherwise it is a class A misdemeanor. There is risk within the meaning of this section if the potential for harm exists, whether or not a particular person's safety is actually jeopardized."
Without going into detail, it appears that the sheriff took umbrage at an attempt to serve papers on a member of his family and engaged in a high-speed chase in a quixotic attempt to "un-serve" the papers by giving them back, and in the ensuing confusion two vehicles were damaged. Perhaps because of the sheriff's official connections with law enforcement, the Attorney General of North Dakota was asked to prosecute him for violating the above-quoted statute and has done so, through a Special Assistant Attorney General. A County Justice from another county was also brought into the case. In the county justice court motions were made to dismiss the complaint on the grounds that the statute was unconstitutional for vagueness and that the complaint did not state an offense. The motions were denied. An appeal was purportedly taken to the district court and subsequently, while the appeal was pending, Mr. Hanson's attorney filed a motion for a writ of prohibition against further proceedings in the case. The latter motion was granted by the district judge, who held that the statute was unconstitutional and that the complaint did not state an offense. The State thereupon appealed to this court, and Mr. Hanson's attorney moved to dismiss the appeal on the ground that the district court order appealed from is not an appealable order. Since the merits have not been briefed and argued, we reach only the motion.
The motion raises these questions: (1) whether the order granting the writ of prohibition and dismissing the complaint is appealable and, if so, (2) whether an application for a writ of prohibition is a proper method of attacking the constitutionality of a statute. We answer both questions in the affirmative, and therefore deny the motion to dismiss.

I
The district judge's order granting the writ of prohibition states that it was
". . . granted on the basis that the proceedings . . . are in excess of the jurisdiction of any court since the statute under which the defendant is charged, . . . is unconstitutional in that it violates both the Due Process and Equal Protection Clauses of the United States and North Dakota Constitutions. Specifically, the language of the statute in question is so vague, indefinite, and overbroad that it fails to set an ascertainable standard of guilt. Furthermore, the statute in question allows different punishment or different degrees of punishment for the same acts committed under the same circumstances by persons in similar situations. . . .
"IT IS THEREFORE ORDERED that the State of North Dakota is forever restrained from taking any further proceedings against the defendant in the above-entitled action and that the Complaint fails to state a cause of action for the reasons as set forth herein and on that basis the Complaint against the defendant is in all things dismissed."
We have repeatedly held that orders dismissing complaints are appealable under subsection 1 of Section 29-28-07, N.D.C.C., which provides:
"An appeal may be taken by the state from:
"1. An order quashing an information or indictment or any count thereof;. . ."
State v. Jelliff, 251 N.W.2d 1 (N.D.1977); State v. Howe, 247 N.W.2d 647 (N.D.1976); State v. Iverson, 219 N.W.2d 191 (N.D. 1974); and State v. Allesi, 211 N.W.2d 733 (N.D.1973). As these cases explain, Rule 12, N.D.R.Crim.P., purported to abolish the quashing of informations, but provided in its place a motion to dismiss. The effect of the motion to dismiss is the same as the effect of the former motion to quash. We held that the two were substantially equivalent *874 and that an order which on its face, without more, has the effect of quashing an information, is appealable. State v. Howe, supra; State v. Iverson, supra. We have also held that, under our law, informations and complaints are substantially the same and that a motion to dismiss a complaint is equivalent to a motion to dismiss an information. State v. Hart, 162 N.W.2d 499 (N.D.1968). We have also held that a complaint, as commonly used in this State, complies with all requirements of an information under our Constitution and statutes. State v. Buehler, 125 N.W.2d 155 (N.D. 1963). We therefore hold that a motion to dismiss a complaint is equivalent to a motion to quash an information, regardless of the court in which it was originally filed, and on this point we reverse State v. Bauer, 153 N.W.2d 895 (N.D.1967). In this connection we note that Section 33-12-40, N.D.C.C., upon which State v. Bauer relied, has been superseded by Rule 37, N.D.R.Crim.P., which does not contain the language of Section 33-12-40 as to grounds for dismissal of complaints, upon which the decision in State v. Bauer was based.
We therefore hold that the order of the district court dismissing the complaint against Hanson is an appealable order.
Hanson attempts to distinguish the decisions cited above from his case by pointing out that the cases cited involved proceedings in district court or county courts of increased jurisdiction, which are courts of record, and not proceedings in county justice courts, which are not. We are not persuaded that the differences between county justice courts and county courts of increased jurisdiction or district courts are pertinent to this question, and we therefore rule that the law is the same as to dismissals of complaints in both, at least when the dismissal is ordered by a district court and constitutes a final adjudication by a court of record, subject only to appeal to the Supreme Court.
We do not decide whether the appeal from the denial of the motion by the county justice court was proper. The application for a writ of prohibition in the district court would have been permissible without the appeal. See part II, infra.

II
The second question is whether an application for a writ of prohibition is an appropriate way to attack the constitutionality of a statute under which a criminal prosecution is being maintained.
In State ex rel. Linde v. Packard, 32 N.D. 301, 310, 155 N.W. 666, 667 (1915), this court took it for granted that a writ of prohibition was available to attack as unconstitutional a law imposing a tax on monies and credits. The court said:
"While the tax commission may have jurisdiction of the subject of taxation, they are, nevertheless, governed by the Constitution and the laws of the state, and can only exercise their powers under legal authority. If the new law, as contended by the relator, is unconstitutional, they have no authority to act thereunder, and it is not a sufficient answer to say it might have acted legally by a return to the procedure of the old law. . . . If the tax commission, therefore, is acting outside of its jurisdiction, the writ of prohibition is the proper remedy."
The North Dakota statutes authorizing the writ of prohibition [Chapter 32-35, N.D.C.C.] are derived directly from the 1877 Code of Civil Procedure of Dakota Territory, Sections 708 to 711, inclusive. The latter sections were derived, in turn, with only slight changes in phraseology, from the California Code of Civil Procedure, as a comparison between the cited Dakota Territorial Code sections and Sections 11,102 to 11,105, inclusive, of the 1876 Codes and Statutes of California will show.
Although we find no California cases in point antedating the Dakota Territory adoption of its pertinent statutes in 1877, we nevertheless are interested in California's subsequent interpretations of nearly identical language adopted in this State.
We find that as early as 1895 the California Supreme Court assumed, just as the North Dakota court did in State ex rel. Linde v. Packard, supra, that application *875 for a writ of prohibition was an appropriate method of attacking the constitutionality of a statute. Levy v. Superior Court, 105 Cal. 600, 38 P. 965, 29 L.R.A. 811 (1895). The California court has adhered to this position ever since. Rescue Army v. Municipal Court, 28 Cal.2d 460, 171 P.2d 8 (1946), appeal dismissed, 331 U.S. 549, 67 S.Ct. 1409, 91 L.Ed. 1666 (1947); Canon v. Justice Court for Lake Valley Jud. Dist., 61 Cal.2d 446, 39 Cal.Rptr. 228, 393 P.2d 428 (1964); Dillon v. Municipal Court, 4 Cal.3d 860, 94 Cal.Rptr. 777, 484 P.2d 945 (1971). We believe this is also the majority rule, as well as the better rule. While the use of a writ of prohibition in cases involving constitutionality of statutes might be abused and used for delay, we believe that the writ will be used sparingly and only in cases where there is no adequate remedy by appeal or otherwise, or where other equitable principles justify the use of the extraordinary writ of prohibition. When so used, writs of prohibition can provide a convenient way of reaching the constitutional question without the expense and delay of a full trial.
At any rate, in this case we decide only that an application for a writ of prohibition is one appropriate way to raise the question of the constitutionality of a criminal statute's being enforced against the applicant.
While our Constitution [Section 89] requires that at least four judges of the Supreme Court concur in declaring a statute unconstitutional on State constitutional grounds, we have held that a district court may first pass on the constitutionality of a statute, with this court having the last word. City of Bismarck v. Materi, 177 N.W.2d 530 (N.D.1970).
We express no opinion as to whether the exercise of the district judge's discretion in this case was appropriate under the facts of the case, nor do we express any opinion as to the merits of the claim of unconstitutionality.
The motion to dismiss the appeal is denied.
ERICKSTAD, C. J., and PEDERSON, PAULSON and SAND, JJ., concur.
