Use Begin/End pattern to not break .Net 4 compatibility.