Each person appointed an assessor or elected or appointed a member of the board of assessment appeals or a collector of town taxes in any town shall be sworn before entering upon the duties of the office to which he has been elected or appointed.