You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite minor, but I'd like to throw it out there for discussion and consideration.
Suppose you have a delegate that receives a parameter by ref/out:
publicdelegatevoid RefAction<T,TState>(refTobj,TStatestate);// API method:publicvoidM<TState>(RefAction<Foo,TState>action,TStatestate);
Currently, writing a lambda of this signature requires writing out the full parameter list.
M((refFoofoo,Barbar)=>{ ...}, someBar);
It'd be much nicer (and more intuitive) if the ref can be applied while still having the parameters implicitly typed:
// Currently yields 'CS0748: Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit'
M((ref foo, bar)=>{ ...}, someBar);
The text was updated successfully, but these errors were encountered:
This is quite minor, but I'd like to throw it out there for discussion and consideration.
Suppose you have a delegate that receives a parameter by
ref
/out
:Currently, writing a lambda of this signature requires writing out the full parameter list.
It'd be much nicer (and more intuitive) if the
ref
can be applied while still having the parameters implicitly typed:The text was updated successfully, but these errors were encountered: