示例#1
0
 private static void SwitchTest()
 {
     var c = new DbColumnSwitch { ColumnName = "test" };
     var sw = Stopwatch.StartNew();
     for (var i = 0; i < 10000000; i++)
     {
         var test = c["ColumnName"];
     }
     sw.Stop();
     Console.WriteLine("Switch: " + sw.ElapsedMilliseconds);
 }
示例#2
0
        private static void SwitchTest()
        {
            var c = new DbColumnSwitch {
                ColumnName = "test"
            };
            var sw = Stopwatch.StartNew();

            for (var i = 0; i < 10000000; i++)
            {
                var test = c["ColumnName"];
            }
            sw.Stop();
            Console.WriteLine("Switch: " + sw.ElapsedMilliseconds);
        }