Interesting syntax: IEnumerable and IEnumerator

posted Oct 27, 2014, 2:43 PM by Lesley Bross
IEnumerable<ActiveSite> ISiteSelector.SelectSites(Stand stand) : implemented by CompleteStand.cs, CompleteStandSpreading.cs, PartialStand Spreading.cs, and PatchCutting.cs

Exposes the enumerator which supports a simple iteration; Can be used in a foreach loop like this:
foreach (ActiveSite site in siteSelector.SelectSites(stand)) {}
Comments