From what I can find on google, VB.NET only has one-statement lambdas, and not multi-statement anonymous functions. However, all the articles I read were talking about old versions of VB.NET, I couldn't find anything more recent than vs2008 beta 1 or 2.
So the question: How can I do this in VB.NET?
C# code:
private void HandleErrors( Action codeBlock ){
try{
codeBlock();
}catch(Exception e){
//log exception, etc
}
}
HandleErrors(() => {
var x = foo();
x.DoStuff();
etc
});