
194 Cal.App.2d 237 (1961)
CHARLES M. FARRINGTON, Plaintiff and Respondent,
v.
JOSEPH W. FAIRFIELD, Defendant and Respondent; EVERT L. HAGAN, Movant and Appellant.
Civ. No. 24802. 
California Court of Appeals. Second Dist., Div. Three.  
July 25, 1961.
 Evert L. Hagan, in pro. per., for Movant and Appellant.
 No appearance for Plaintiff and Respondent.
 Ethelyn F. Black and Max H. Gewirtz for Defendant and Respondent.
 FORD, J.
 This is an appeal by Evert L. Hagan from an order denying his motion that he be substituted as petitioner in the place of Charles M. Farrington in a mandamus proceeding.
 The record discloses that on March 10, 1959, a judgment was entered in which it was ordered that the respondent Fairfield permit Farrington "to examine and make abstracts from the stock register, minutes of proceedings of the directors and shareholders and books of account of Benedict Heights, Incorporated, in person or by his attorney or agent," such inspection to be had at a designated time and place. A peremptory writ of mandamus was issued pursuant to the judgment. Thereafter, the appellant Hagan made his motion for an order substituting him as petitioner in the place of Farrington "upon the ground that on December 9, 1959, Charles M. Farrington assigned the cause of action in the above matter to Evert L. Hagan." To the declaration of Hagan filed in support of his motion was attached a copy of the assignment upon which he relied, the body of which was as follows:
 "For value received, receipt and sufficiency of which is hereby acknowledged, the undersigned Charles M. Farrington, hereby transfers and assigns to Evert L. Hagan all his right, title and interest in and to the above mandamus proceeding and all of his right, title and interest in and to Certificate Number 35 of Benedict Heights, Inc., a corporation."
 On February 19, 1960, the court denied the appellant's motion. In the minutes, the basis of that ruling is stated as *239 follows: "The assignment of shares of stock may be made, but not the order contained in a peremptory writ of mandate. Hagan's remedy is to demand an inspection and if refused to seek a writ."
 [1] The purpose of a writ of mandamus is to enforce a clear legal right of the particular petitioner against one who has a legal duty to perform an act necessary to the enjoyment of such right. [2] Although generally classed as a legal remedy, the question of whether it should be applied has been said to be largely controlled by equitable considerations. (See Dowell v. Superior Court, 47 Cal.2d 483, 486-487 [304 P.2d 1009]; Wallace v. Board of Education, 63 Cal.App.2d 611, 616-617 [147 P.2d 8].) [3] When the court ordered the issuance of a peremptory writ of mandamus, its determination was based upon a right then existing in Farrington by virtue of his status as a stockholder. The appellant Hagan seeks to have the benefit of that determination. But the factual situation has changed and his right to the remedy as the assignee of certificate Number 35 must, of necessity, be the subject of an independent proceeding in which the applicable law may be applied to the facts there disclosed.  [fn. 1] Hagan can prevail only in his own present right and not by virtue of the right Farrington had at the time he filed his petition and at the time of the judgment. (See Hagan v. Fairfield, 183 Cal.App.2d 703, 706-707 [7 Cal.Rptr. 248].)
 The order is affirmed.
 Shinn, P. J., and Vallee, J., concurred.
NOTES
[fn. 1]  1. In section 3003 of the Corporations Code it is provided that certain corporate records "shall be open to inspection upon the written demand of any shareholder ... at any reasonable time, for a purpose reasonably related to his interests as a shareholder." (Emphasis added.) In Hagan v. Fairfield, 183 Cal.App.2d 703 [7 Cal.Rptr. 248], a judgment denying a writ of mandamus to compel the defendant to allow an examination of the books and records of Benedict Heights, Inc., by Hagan was affirmed. In that case, Hagan claimed the right as the assignee of certificate Number 36. The appellate court said in part, at page 706: "Since the Corporations Code provides that records of a corporation shall be open to inspection by a shareholder, and since that code also provides that a shareholder is a holder of record of shares or a shareholder of record, and since the petition herein does not allege that petitioner is such a shareholder, it is apparent that the petition has not alleged a proper basis for issuing a writ of mandamus."
