BHoM_Engine icon indicating copy to clipboard operation
BHoM_Engine copied to clipboard

Create Deconstruct(IOutput) to enable single line variable assignments from multi-output methods

Open JosefTaylor opened this issue 3 years ago • 2 comments
trafficstars

Description:

add Deconstruct(IOutput) to allow syntax like:

var (a, b) = MyMultiOutputMethod();

JosefTaylor avatar Jun 02 '22 15:06 JosefTaylor

Will try to get this added ASAP.

Link to msdn docs:

https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/deconstruct

IsakNaslundBh avatar Jun 02 '22 15:06 IsakNaslundBh

Have discussed this offline with @IsakNaslundBh - this would need a wider discussion on the active upgrade to C#7. C#7 is available since we updated the .Net versions for BHoM and BHoM_Engine and an update now could be beneficial, but this needs to be discussed at a framework level first before actioning.

FraserGreenroyd avatar Jun 03 '22 12:06 FraserGreenroyd