PrepAway - Latest Free Exam Questions & Answers

You need to ensure that only objects of the System.DateTime type can be added to the collection

You create an ArrayList object. You need to ensure that only objects of the System.DateTime type
can be added to the collection. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Use a Hashtable collection.

B.
Use the ToString() method on objects that you add to the ArrayList.

C.
Use a List<T> collection.

D.
Restrict the ArrayList variable to a capacity of 16 items.

One Comment on “You need to ensure that only objects of the System.DateTime type can be added to the collection


Leave a Reply