コード例 #1
0
ファイル: Program.cs プロジェクト: lastunicorn/Skyscrapers
        private static void Measure(Action action)
        {
            Stopwatch stopwatch = Stopwatch.StartNew();

            action();
            stopwatch.Stop();

            Console.WriteLine();

            ValueView <string> .QuickWrite("Elapsed Time:", stopwatch.Elapsed.ToString());
        }
コード例 #2
0
        public void Execute()
        {
            StringView.QuickWrite("First Name:", "John");
            StringView.QuickWrite("Last Name:", "Doe");
            Int32View.QuickWrite("Age:", 25);

            // or

            ValueView <string> .QuickWrite("First Name:", "John");

            ValueView <string> .QuickWrite("Last Name:", "Doe");

            ValueView <int> .QuickWrite("Age:", 25);
        }