BHoM / BHoM_Engine

Internal manipulation of the BHoM
GNU Lesser General Public License v3.0
26 stars 14 forks source link

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

Open JosefTaylor opened 2 years ago

JosefTaylor commented 2 years ago

Description:

add Deconstruct(IOutput) to allow syntax like:

var (a, b) = MyMultiOutputMethod();

IsakNaslundBh commented 2 years ago

Will try to get this added ASAP.

Link to msdn docs:

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

FraserGreenroyd commented 2 years ago

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.