IEnumerable接口使用

要使用foreach语句对对象遍历,对象必须实现IEnumerable接口,下面是一个Demo。

结果:

原文地址:https://www.cnblogs.com/xiashengwang/p/2578790.html