(a) No candidate for State Senator or Representative in the General Assembly shall make any written pledge to give or withhold that candidate's own vote on any proposed law or legislation, nor shall any other person seek to influence any such candidate in the candidate's attitude upon any proposed law or legislation by offer or promise of a vote or votes or of any support at any primary or election.
(b) Whoever violates subsection (a) of this section shall be fined not less than $50 nor more than $1,000, or imprisoned not less than 1 month nor more than 2 years, or both.