Okay, after MyColors' default contructor is called, what happens next?
And could you please answers for the following questions too?
When I use foreach (string color in mc) in Main method, I understand mc part.(since mc is enumerable now), but I don't understand how come 'string color in MyColors class'(string color in mc) represents 'Color array's elements' in MyColors class?
I know it might sound redundant to answer some of these quetions, but I am a C# beginner, so please understand that.
thanks,
Izzy
Main Topics
Browse All Topics





by: angelIIIPosted on 2009-09-08 at 01:11:25ID: 25279604
>It calls MyColors' default constructor, correct?
yes
>GetEnumerator() method should be called to make it work, but which line in Main method calls GetEnumerator() method?
foreach is the one that will "call" the getenumarato