题目内容
(请给出正确答案)
[主观题]
Youaredevelopingacustom-collectionclass.Youneedtocreateamethodinyourclass.Youneedtoensuret
hatthemethodyoucreateinyourclassreturnsatypethatiscompatiblewiththeForeachstatement.Whichcriterionshouldthemethodmeet?()
A.ThemethodmustreturnatypeofeitherIEnumeratororIEnumerable.
B.ThemethodmustreturnatypeofIComparable.
C.Themethodmustexplicitlycontainacollection.
D.Themethodmustbetheonlyiteratorintheclass.
提问人:网友shmilyleilei
发布时间:2022-01-07