有人能给我解释一下IEnumerable和IEnumerator吗?例如,什么时候用它胜过foreach?IEnumerable和IEnumerator的区别是什么?为什么我们需要使用它?