Which of the following is TRUE with regards to the required code?

You work as a developer at ABC.com. The ABC.com network consists of a single domain named
ABC.com.
You have received instructions to create a custom collection for ABC.com. Objects in the
collection must be processed via a foreach loop.
Which of the following is TRUE with regards to the required code?

You work as a developer at ABC.com. The ABC.com network consists of a single domain named
ABC.com.
You have received instructions to create a custom collection for ABC.com. Objects in the
collection must be processed via a foreach loop.
Which of the following is TRUE with regards to the required code?

A.
The code should implement the ICollection interface.

B.
The code should implement the IComparer interface.

C.
The code should implement the IEnumerable interface.

D.
The code should implement the IEnumerator interface.

Explanation:



Leave a Reply 3

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


vivek

vivek

its option C Ienumerable, but if its multiple choice then D will also include as it need implementation of Ienumerator as well.

Chinmay

Chinmay

If keeping a track of state is required then it is preferable to use IEnumerator.Since just iterating through elements is mentioned so in this case it IEnumerable
C : IEnumerable