This project is read-only.
1
Vote

Exception was thrown: System.NotImplementedException when run the compiled exe

description

I try to compile the ForTest.cs (content below) to .exe, when I run the exe file in cmd, I got an error in result:
Delta is: 0
Unhandled exception: System.NotImplementedException: Exception was thrown: System.NotImplementedException
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BenchMark
{
    class LinqTest
    {
        static void Main(string[] args)
        {
            long t1 = DateTime.Now.Ticks;
            string[] arg = { "nam", "bac", "dong", "tay" };
            var a = arg.FirstOrDefault(t => t == "nam");
            Console.WriteLine(a);
            long t2 = DateTime.Now.Ticks;
            var d = t2 - t1;
            Console.WriteLine("Delta is: " + d);
            Console.ReadLine();
        }
        
    }
}

comments