I need some help translating this code from c# to vb.net:
private static Action<int, int> TranslateOrigin(Action<int, int> f, int x, int y)
{
return (a, b) => f(a + x, b + y);
}
The automatic translators I've found on the internet make a mess of it, producing:
Private Shared Function TranslateOrigin(f As Action(Of Integer, Integer), x As Integer, y As Integer) As Action(Of Integer, Integer)
Return Function(a, b) f(a + x, b + y)
End Function
Which won't compile, complaining that "Expression doe not produce a value." I've been poking at it for a while now and haven't had any luck translating it, any help would be greatly appreciated.