When action is brought against a person for usurping an office, the Attorney General, in addition to the statement of the cause of action, may set forth in the complaint the name of the person rightfully entitled to the office, with a statement of his right thereto; and in such case, upon proof by affidavit that the defendant has received fees or emoluments belonging to and by means of his usurpation of the office, an order shall be granted by a judge of the superior court for the arrest of the defendant, and holding him to bail; and thereupon he shall be arrested and held to bail in the same manner, and with the same effect, and subject to the same rights and liabilities, as in other civil actions where the defendant is subject to arrest.
N.C. Gen. Stat. § 1-519