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?

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?

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.



Leave a Reply 1

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