Any person who has held or who may hereafter hold de facto any office or position in the public service of the state and who has performed or may hereafter perform the duties of such office or position, shall be entitled to the emoluments and compensation appropriate to the office or position for the time in fact so held, and may recover therefor in any court of competent jurisdiction, notwithstanding any refusal or failure of any other person or officer.
N.J.S. § 52:14-16