예제 #1
0
        async static Task Main(string[] args)
        {
            Console.Write("Sleep?: ");
            var s     = Console.ReadLine();
            var sleep = s.IndexOfAny(new[] { 't', 'T', 'y', 'Y', '1' }) > -1;

            {
                var foo = new Fnord("abc");
                foo.Rename("ABC");
                await Sub(sleep);
            }
            Console.WriteLine("Hello World!");
            GC.Collect();
            GC.WaitForPendingFinalizers();
            Console.WriteLine("See you later!");
            //System.Diagnostics.Debugger.Break();
        }
예제 #2
0
        async static Task Sub(bool sleep)
        {
            var bar = new Fnord("def");

            await Subber(sleep);

            var quux = new Fnord("jkl");

            {
                await Baz();

                var fnord = new Fnord("mno");
                {
                    var qwerty = new Fnord("vwx");
                }
            }
            using (var x = new MyDisposable())
            {
                var qwerty = new Fnord("FNORD");
            }
            Foobar();
            bar.Rename("DEF");
        }