Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC#foreach and iteratorsSingle-choice MCQ

What does the C# compiler require of any object used directly in a foreach loop (the thing after 'in')?

foreach (var item in collection) { /* ... */ }