Program.cs 759 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _05StringSpeed
{
    class Program
    {
        static void Main(string[] args)
        {
            string sErg = "";
            StringBuilder sb = new StringBuilder("");
            DateTime t0 = DateTime.Now;             // Aktuelle Uhrzeit speichern
            for (int i = 0; i < 5000000; i++)
            {
                //sErg = sErg + '.';
                sb.Append('.');
            }
            Console.WriteLine((DateTime.Now-t0).TotalMilliseconds);
                                                    // Von der jetzigen Uhrzeit die Startzeit abziehen
            // Console.WriteLine(sErg);
        }
    }
}