So for my law students participating inn student elections - a bit of legislative background.
(1)A person shall be guilty of a corrupt practice if he is guilty of treating.
(2)A person shall be guilty of treating if he corruptly, by himself or by any other person, either before, during or after an election, directly or indirectly gives or provides, or pays wholly or in part the expense of giving or providing, any meat, drink, entertainment or provision to or for any person—
(a)for the purpose of corruptly influencing that person or any other person to vote or refrain from voting; or
(b)on account of that person or any other person having voted or refrained from voting, or being about to vote or refrain from voting.
(3)Every elector or his proxy who corruptly accepts or takes any such meat, drink, entertainment or provision shall also be guilty of treating.
(2)A person shall be guilty of treating if he corruptly, by himself or by any other person, either before, during or after an election, directly or indirectly gives or provides, or pays wholly or in part the expense of giving or providing, any meat, drink, entertainment or provision to or for any person—
(a)for the purpose of corruptly influencing that person or any other person to vote or refrain from voting; or
(b)on account of that person or any other person having voted or refrained from voting, or being about to vote or refrain from voting.
(3)Every elector or his proxy who corruptly accepts or takes any such meat, drink, entertainment or provision shall also be guilty of treating.
I knew one MP who would never a buy a round of drinks in his constituency - on the grounds that he might be accused of treating. I guess his party workers felt it didn't apply as they were already committed to voting for him - but it was probably best to be cautious!
Other information on election offences can be found at http://www.cps.gov.uk/legal/d_to_g/election_offences/