No person shall be elected to any county office, except the office of district attorney otherwise provided for by this act, unless he shall be at least eighteen years of age, a citizen of the United States and a resident of the county, and shall have resided within the county for one year next preceding his election.
16 P.S. § 3413