What's New in C# 10: Reclaim Horizontal Editing Space and Simplify Nesting

added by DotNetKicks
11/19/2021 7:09:19 AM

625 Views

This is the first part of a series on the new features introduced with C# 10. Prior to C# 10, to define types as being part of a specific namespace you would use the following syntax: namespace ConsoleAppCS9 { public class SomeClass { public void SomeMethod(bool b, string s) { if (b is true) { if (s is not null) { // do something } } } } namespace SomeNestedNamespace { public class AClassInANestedNamespace { // etc.


0 comments