StringEnumerator.cs 774 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* System.Collections.Specialized.StringEnumerator.cs
  2. * Authors:
  3. * John Barnette ([email protected])
  4. *
  5. * Copyright (C) 2001 John Barnette
  6. */
  7. namespace System.Collections.Specialized {
  8. public class StringEnumerator {
  9. private StringCollection coll;
  10. private IEnumerator enumerable;
  11. // assembly-scoped constructor
  12. internal StringEnumerator(StringCollection coll) {
  13. this.coll = coll;
  14. this.enumerable = ((IEnumerable)coll).GetEnumerator();
  15. }
  16. // Public Instance Properties
  17. public string Current {
  18. get { return (string) enumerable.Current; }
  19. }
  20. // Public Instance Methods
  21. public bool MoveNext() {
  22. return enumerable.MoveNext();
  23. }
  24. public void Reset() {
  25. enumerable.Reset();
  26. }
  27. }
  28. }