New Features in C# 7.0
channel9.msdn.com
channel9.msdn.com
I have code bases that are about to become significantly shorter because of both. I do need to sit down and perform an analysis to understand the performance implications of this, thought I suspect there aren't many.
I'm not sure what to make of local functions. I've read and re-read about them but I still don't see the utility over a private function, unless they were intended to alleviate the performance issues that come with using a local Func<> inside of a method.
Pattern matching for example on types may indicate an OO design problem. Tuples may indicate an expression problem; often times a properly named class expresses intent much better.
As with any tool it is possible to misuse it, but pattern matching and tuples feel to me somehow as an especially fit tool to misuse.
It's a nice touch you can define the function at the end, looks clearer.
https://view.officeapps.live.com/op/view.aspx?src=https%3a%2...