
16 Cal.2d 696 (1940)
J. F. KATENKAMP, Petitioner,
v.
THE SUPERIOR COURT OF SANTA BARBARA COUNTY, Respondent.
S. F. No. 16449. 
Supreme Court of California. In Bank.  
December 16, 1940.
 Leland Crawford and J. F. Goux for Petitioner.
 Heany, Price, Postel & Parma for Respondent.
 TRAYNOR, J.
 Petitioner and other persons, owners of beach property in Santa Barbara County, recovered a judgment in the Superior Court of that county on July 20, 1937, ordering the Union Realty Company to remove two groins upon its property which were causing the beach of the plaintiff's property to be washed away and accordingly found to be nuisances. The judgment also enjoined the corporation from erecting on its property any structure which would interfere with the normal flow of the tides. The judgment was affirmed by the District Court of Appeal for the Second District and this court denied a petition for a hearing, whereupon remittitur was filed.
 Four months before the decision in the trial court the Union Realty Company executed a deed of all its property to William J. Knapp, then the owner of all the issued and outstanding shares of stock of the corporation, and thereafter filed a certificate of dissolution with the Secretary of State and went out of existence. Following the return of the remittitur, the judgment in the injunction suit was served upon Knapp who failed to remove the groins as ordered. Plaintiffs then instituted contempt proceedings against him, serving on him an order to show cause why he should not be held in contempt for failing to comply with the injunction. This proceeding was before a different judge from the one who heard the original action. Knapp, appearing specially, maintained that the court had no jurisdiction on the grounds that it had never actually issued a mandatory injunction *698 commanding Knapp or any other person to remove the groins and that Knapp was never a party to the action. The court thereupon quashed the order to show cause and dismissed the proceedings. One of the plaintiffs now petitions this court for a writ of mandate to the Superior Court of Santa Barbara County directing it to proceed with the contempt proceedings.
 [1] If a court is mistaken in its assumption that it does not possess the requisite jurisdiction, mandamus will issue to compel it to assume jurisdiction. (Golden Gate Tile Co. v. Superior Court, 159 Cal. 474 [114 P. 978]; City of San Diego v. Andrews, 195 Cal. 111 [231 P. 726]; Pacific States Corp. v. Superior Court, 72 Cal.App. 241 [236 P. 938].) Such writ does not purport to interfere with the court's discretion in deciding the case. If, as plaintiff alleges, a valid mandatory injunction has been issued binding upon Knapp, the lower court's refusal to proceed with contempt proceedings leaves the plaintiff with no adequate or immediate remedy to enforce the judgment unless he petitions for a writ of mandate to compel the lower court to exercise jurisdiction.
 [2] The judgment of the trial court in the injunction suit provided: "Now, therefore, it is hereby ordered, adjudged, and decreed that a mandatory injunction issue out of this court commanding defendant to forthwith permanently remove from, upon, and in front of the property hereinafter described, those two certain structures known as groins, ..." Respondent contends that herein there was no mandatory injunction but only an order for a mandatory injunction, the terms of which were to be fixed by the court at the time of its issuance in the future. He maintains that there can be no contempt of court until the mandatory injunction actually issues and that the petitioner must therefore first proceed to procure a writ of injunction from the trial court before the alleged contemnor could be held in contempt of court.
 This contention is without merit. In advancing his argument respondent points to the different phraseology used by the court in the same judgment with regard to the prohibitory injunction: "It is further ordered, adjudged, and decreed that defendant, its officers, agents, employees, and/or servants, be and they and each of them are hereby perpetually enjoined from building upon or in front of the hereinabove *699 described real property any structure upon the shore, into the waters of Miramar Bay or the Pacific Ocean, which has the effect of changing the normal and natural condition of the tides, currents, and/or littoral drift of the waters fronting and/or upon the properties of plaintiffs, or any of them." A mere variance in language, however, does not signify that while the prohibitory injunction was intended to take effect immediately, the mandatory injunction was not to issue until a future time. The judgment seems plainly one in which both a mandatory and prohibitory injunction were issued on the same basis. Thus the trial court states its conclusions of law as follows: "That plaintiffs are entitled to a mandatory injunction of this Court requiring said defendant to forthwith permanently remove said groins and each of them, from, upon and in front of its said property and are further entitled to a judgment of this Court perpetually enjoining said defendant from maintaining and using any structure upon its said property in such a manner as to interfere with the natural and normal flow of the ocean currents, tides, and/or waters to and upon the properties of said plaintiffs, and each of them. LET JUDGMENT BE ENTERED ACCORDINGLY." (Italics added.) Finding that plaintiffs were entitled to a mandatory and a prohibitory injunction, the trial court issued both in its judgment.
 While the present litigation began in October, 1936, it was not until March, 1940, that the case was finally disposed of on appeal enabling the plaintiffs to secure their injunctive relief. The entire proceedings in the trial court were concerned with the propriety of issuing such an injunction. The two appeals taken from such proceedings (Katenkamp v. Union Realty Co., 36 Cal.App.2d 602 [98 PaCal.2d 239]; Katenkamp v. Union Realty Co., 6 Cal.2d 765 [59 PaCal.2d 473]), involved the propriety of issuing a judgment embodying a mandatory injunction. The trial court obviously intended its judgment to be not a mere declaration of plaintiffs' right to relief upon application in the future, but a final disposition of the case granting to the plaintiffs the relief for which they prayed.
 [3] Respondent contends that he is entitled to know the precise command of the court before he can be held for contempt. The injunction issued by the trial court in this case, however, embodies no ambiguity. It plainly orders the removal by the defendant of two specified groins. *700
 Respondent notes that a trial court can dissolve or amend an injunction where conditions warrant it and should consider any changed conditions before enforcing an injunction. This observation affords no basis for arguing that the judgment of the trial court in the present case did not constitute an existing enforceable mandatory injunction.
 [4] The corporation's disposition of its property and its dissolution prior to the issuance of judgment did not affect the validity of the judgment. Section 399 of the Civil Code provides that "No action or proceeding to which a corporation is a party shall abate by the dissolution of such corporation".
 [5] William J. Knapp was bound by the injunction issued even though the named defendant in the action was the Union Realty Company. A corporation, as an artificial entity, cannot of itself perform or refrain from performing an act; only its officers and agents can. An injunction against a corporation binds not only the so-called "corporate entity" but also all persons who act for the corporation in the transaction of its business and have knowledge of the decree. Disobedience by such persons may subject them to punishment for contempt. (Norton v. Superior Court, 65 Cal. 496 [4 P. 489]; Golden Gate Consolidated Min. Co. v. Superior Court, 65 Cal. 187 [3 P. 628]; Drew v. Superior Court, 180 Cal. 711 [182 P. 417]; McFarland v. Superior Court, 194 Cal. 407 [228 P. 1033]; High, Injunctions, 4th ed., sec. 1443.) The fact that the injunction is issued against the corporation alone rather than against it, its officers, agents and employees, cannot change the application of this rule. An injunction issued against a corporation is in effect an injunction against the officers, agents, and employees. William J. Knapp as sole shareholder in the corporation during its existence, and successor in interest to its property on dissolution, was in control of the corporate affairs. Upon service of the injunction on him he was bound by its provisions.
 [6] Furthermore, while a corporation is usually regarded as an entity separate and distinct from its stockholders, both law and equity will, whenever necessary to circumvent fraud or protect the rights of third persons disregard this distinct existence and treat them as identical. (Wenban Estate v. Hewlett, 193 Cal. 675 [227 P. 723]; Wood Estate Co. v. Chanslor, 209 Cal. 241 [286 P. 1001]; Clark v. Millsap, *701 197 Cal. 765 [242 P. 918]; Hotaling v. Hotaling, 193 Cal. 368 [224 P. 455, 56 A.L.R. 734]; Minifie v. Rowley, 187 Cal. 481 [202 P. 673]; Erkenbrecher v. Grant, 187 Cal. 7 [200 P. 641]; Stanford Hotel Co. v. M. Schwind Co., 180 Cal. 348 [181 P. 780]; 6A Cal.Jur. 75.) In the present case the injunction against the Union Realty Company is in effect against William J. Knapp, its sole shareholder, and contempt proceedings may properly be brought against him.
 Let the peremptory writ of mandate issue.
 Edmonds, J., Spence, J., pro tem., Shenk, J., Carter, J., Houser, J., and Gibson, C.J., concurred.
