I was just wondering about this case
void exc(Func<int> fn) {
fn();
}
I can do the below
public void test() {
exc(delegate{return 1;});
}
However I like the => syntax so i tried
public void test() {
exc(void=>1);
}
It didnt compile. Is there a way I may use the => syntax?