What has to be done to class Test to make foreach loop to be executed?
nothing
provide inheritance from IEnumerable
make Test to inherit from any interface and use interface instead of objects
it can be done only using class List
it can be done only with ArrayList
C# question 2
Next question
Home
Array of objects is a collection type, which supports foreach loop.