The violation of a (valid) municipal ordinance is a misdemeanor. G.S. 14-4; S. v. Barrett, 243 N.C. 686, 91 S.E. 2d 917, and cases cited.
Plaintiffs do not allege that they, or any of them, were at any time prosecuted or arrested for alleged violation of said ordinance provisions. Since July 12, 1963, defendant has been restrained from obtaining warrants and making arrests for such violations.
Ordinarily, under a well-established general rule, an injunction will not lie to restrain enforcement of an ordinance creating a criminal offense. If, as plaintiffs allege, the ordinance provisions now challenged are unconstitutional or otherwise invalid, any plaintiff who may be prosecuted for violation thereof will have a complete defense to such criminal prosecution and therefore an adequate remedy at law. Decisions and texts stating the general rule, the reasons therefor and exceptions thereto are collected and set forth in Walker v. Charlotte, 262 N.C. 697, 138 S.E. 2d 501. Restatement is unnecessary.
The challenged ordinance provisions do not purport to prohibit the sale by plaintiffs from motor vehicles of ice cream and related products. Compare Tastee-Freez, Inc. v. Raleigh, 256 N.C. 208, 123 S.E. 2d 632; also, see S. v. Byrd, 259 N.C. 141, 130 S.E. 2d 55. Moreover, plaintiffs may advertise their products and the itineraries and schedules of their mobile units by any and all methods not in conflict with said ordinance provisions.
The challenged ordinance provisions do not refer to plaintiffs’ said business or to any business involving the use of public streets for the *47sale of products from mobile units. They declare “(i)t shall be unlawful for any person to create, assist in creating, permit, continue or permit the continuance of any unreasonably loud, disturbing or unnecessary noise in the city.’' As stated by Judge Pless, whether any ordinance provision has been violated and the validity of such provision must be considered in the context of a specific factual situation.
“A statute may be valid in part and invalid in part.” 82 C.J.S., Statutes § 92; Constantian v. Anson County, 244 N.C. 221, 228, 93 S.E. 2d 163, and cases cited. This applies equally to an ordinance. Fox v. Commissioners of Durham, 244 N.C. 497, 501, 94 S.E. 2d 482. Connor, J., reminds us that confusion is caused “by speaking of an act as unconstitutional in a general sense.” St. George v. Hardie, 147 N.C. 88, 97, 60 S.E. 920.
Whether any provision of the challenged ordinances has been violated must be determined on the basis of the time, place and circumstances on the day and occasion of the alleged violation. In the event of arrest and criminal prosecution for such alleged violation, the accused may defend on the grounds (1) that his conduct did not violate such ordinance provision, and (2) that such ordinance provision, if interpreted as applicable to his conduct, is unconstitutional or otherwise invalid. In such case, the accused has an adequate remedy at law.
Plaintiffs’ action is to enjoin enforcement of the ordinance provision in respect of any and all conduct in which any of the several plaintiffs may engage. In the circumstances here considered, such class action does not lie. Here, the said general rule, namely, that injunction will not lie to restrain enforcement of an ordinance creating a criminal offense, applies.
Plaintiffs cite Speedway, Inc. v. Clayton, 247 N.C. 528, 101 S.E. 2d 406; Advertising Co. v. Asheville, 189 N.C. 737, 128 S.E. 149; Surplus Store, Inc. v. Hunter, 257 N.C. 206, 125 S.E. 2d 764; Schloss v. Jamison, 258 N.C. 271, 128 S.E. 2d 590. In these and similar decisions, statutes or ordinances prohibiting otherwise lawful businesses or business transactions were involved. The questions presented were decided in the context of specific factual situations. Suffice to say, we are not disposed to make further exceptions to the well-established general rule stated above. Walker v. Charlotte, supra; Smith v. Hauser, 262 N.C. 735, 138 S.E. 2d 505.
The order (judgment) of Judge Pless, which vacated the interlocutory restraining order, is affirmed; and the cause is remanded with direction that judgment dismissing the action be entered.
Affirmed.