Rushal Arora

Rushal Arora

  • NA
  • 112
  • 120.2k

FirstOrDefault operator in LINQ

Mar 15 2013 3:08 PM

            int[] ar = new int[] { 1, 5, 2, 4, 7 };
            var v = ar.First(x => x > 7);
            MessageBox.Show(v.ToString());

It is not throwing any exception , why ?
i Want it to throw an exception but how?

Answers (1)