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
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
Correct “A”
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.
Agree with A
Its A