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
publicstaticboolDeconstruct<T>(this T[]arr,outTitem0,outTitem1){if(arr.Length !=2){item0=item1=default;// ref parameters would be useful here, no need to initialize out parametersreturnfalse;}item0= arr[0];item1= arr[1];returntrue;}
Actually, it can be more then just Boolean. It be can some IDeconstructionResult, but at least Boolean can be really useful.
The text was updated successfully, but these errors were encountered:
Please bring this discussion to the csharplang repro, where language changes are discussed (as opposed to implementation bugs of the compiler with regards to the current language design).
I'll go ahead and close this issue.
Tagging @gafter as FYI, since he's the driver for various patterns features.
Fir example:
Actually, it can be more then just Boolean. It be can some IDeconstructionResult, but at least Boolean can be really useful.
The text was updated successfully, but these errors were encountered: