Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System;
- namespace cap07.usoienumerator
- {
- public class Gente : IEnumerable
- {
- private Persona[] personas;
- public Gente(Persona[] personas)
- {
- this.personas = new Persona[personas.Length];
- for(int i = 0; i < personas.Length; ++i)
- {
- this.personas[i] = personas[i];
- }
- }
- IEnumerator IEnumerable.GetEnumerator()
- {
- return (IEnumerator) GetEnumerator();
- }
- public GenteEnumerator GetEnumerator()
- {
- return new GenteEnumerator(personas);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement