You can do this with a VA snippet. Add a new snippet with this text:
private void On$EventName$()
{
if($EventName$ != null)
$EventName$();
}
make sure you give it a name, and then tell VA you want to insert this snippet. You will be prompted for "EventName" and when you provide this, you answer is inserted into the snippet text, giving you the code