All bargains, bonds and assurances made or given for the purchase or sale of any office whatsoever, the sale of which is contrary to law, shall be void. (5 and 6 Edw. VI, c. 16, s. 3; R.C., c. 77, s. 2; Code, s. 1871; Rev., s. 2366; C.S., s. 3202.)