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
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
B
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();