Which code should you use?

You have the following code:


You need to retrieve all of the numbers from the items variable that are greater than 80.
Which code should you use?


A. Option A
B. Option B
C. Option C
D. Option D

microsoft-exams

2 thoughts on “Which code should you use?

  1. List items = new List(){
    100,
    95,
    80,
    75,
    95
    };

    var result = items.Where(i => i > 85);

    foreach (Int32 n in result)
    {
    Console.WriteLine(n);
    }
    Console.ReadKey();

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.