public void GetEnumeratorEx()
{
//ExStart
//ExFor:WarningInfoCollection.GetEnumerator
//ExFor:WarningInfoCollection.Clear
//ExSummary:Shows how to read and clear a collection of warnings.
WarningInfoCollection wic = new WarningInfoCollection();
var enumerator = wic.GetEnumerator();
while (enumerator.MoveNext())
{
WarningInfo wi = (WarningInfo)enumerator.Current;
Console.WriteLine(wi.Description);
}
wic.Clear();
//ExEnd
}
}