c# iterate over enumerator code example Example: c# iterate enum var values = Enum.GetValues(typeof(Foos));