3 ms·
C# 7 Features Worth Knowing
- deleted 10y ago[deleted]
- drblast 10y agoThe out variables example for C# 7 is misleading. You don't need the int quantity; declaration. Leaving it in there defeats the purpose of the example which is meant to show that the declaration is not necessary :-)
- alain_gilbert 10y agoI was indeed confused by this example ! Thanks for the precision :)
- madiathomas 10y agoAuthor probably forgot to remove that declaration statement when he copied and pasted the new way of doing it.
- hermitdev 10y agoA more complete list of new features (and with better examples) is available at [0]. That being said, I think this post highlights some of more beneficial features. Most of the others (maybe with the exception of type pattern matching) will likely lead, I fear, to less decipherable code. [0] https://blogs.msdn.microsoft.com/dotnet/2017/03/09/new-features-in-c-7-0/ https://blogs.msdn.microsoft.com/dotnet/2017/03/09/new-featu...
- moomin 10y agoThese are definitely the "uncontroversial" features. None of them really change anything. I'm not convinced by the new switch statement either, but I'll suspend judgement until I see some examples in the wild. The examples Microsoft are giving don't strike me as a good idea.
- LyalinDotCom 10y agoAs part of the Visual Studio 2017 launch event Mads (C# PM) also recorded a video for those folks who prefer watching, check it out here: https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2017-Launch/?sort=status&direction=desc&tag=csharp https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio...