Which line of code should you use?

You have a class named Customer and a variable named customers.
You need to test whether the customers’ variable is a generic list of Customer objects.
Which line of code should you use?

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

microsoft-exams

4 thoughts on “Which line of code should you use?

  1. Agree A is the correct answer here. If it was D it should have been written if (customers.GetType() == typeof(List<Customer))

    Even the explanation says this.

Leave a Reply

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


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