Exemplo n.º 1
0
        async static Task Main(string[] args)
        {
            Console.WriteLine("\n=== IndicesAndRanges ===");
            IndicesAndRanges.Demo();

            Console.WriteLine("\n=== SwitchExpressions ===");
            SwitchExpressions.Demo();

            Console.WriteLine("\n=== PatternMatching ===");
            PatternMatching.Demo();

            Console.WriteLine("\n=== StaticLocalFunctions ===");
            StaticLocalFunctions.Demo();

            Console.WriteLine("\n=== UsingDeclarations ===");
            UsingDeclarations.Demo();

            Console.WriteLine("\n=== AsyncStreams ===");
            await AsyncStreams.Demo();

            Console.WriteLine("\n=== TargetTypedNew ===");
            TargetTypedNew.Demo();

            Console.WriteLine("\n=== NullCoallescingAssignment ===");
            NullCoallescingAssignment.Demo();

            Console.WriteLine("\n=== DefaultInterfaceMethods ===");
            DefaultInterfaceMethods.Demo();

            Console.WriteLine("\n=== DisposableRefStruct ===");
            DisposableRefStruct.Demo();

            Console.WriteLine("\n=== UnmanagedConstructedTypes ===");
            UnmanagedConstructedTypes.Demo();
        }
Exemplo n.º 2
0
        static void Main()
        {
            //0. Attributes on Properties
            AttributesOnProperties.Run();

            //1. Readonly members
            ReadonlyMembers.Run();

            //2. Default interface methods
            DefaultInterfaceMethods.Run();

            //3. Patterns matching
            PatternMatching.Run();

            //4. Using Declarations
            UsingDeclarations.Run();

            //5. Static Local Functions
            StaticLocalFunctions.Run();

            //6. Disposable ref structs
            DisposableRefStructs.Run();

            //7. Nullable Reference Types
            NullableReferenceTypes.Run();

            //8. Asynchronous streams
            AsynchronousStreams.Run();

            //9. Asynchronous disposable
            AsynchronousDisposable.Run();

            //10. Indeces And Ranges
            IndecesAndRanges.Run();

            //11. Null-coalescing assignment
            NullCoalescingAssignment.Run();

            //12. Nested Stackalloc
            NestedStackalloc.Run();

            //13. Enhancement of interpolated verbatim strings
            InterpolatedVerbatimStringsEnhancement.Run();
        }