IEnumerable.cs 787 B

1234567891011121314151617181920
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. using System.Collections;
  6. using System.Runtime.InteropServices;
  7. using System.Runtime.CompilerServices;
  8. namespace System.Collections.Generic
  9. {
  10. // Implement this interface if you need to support foreach semantics.
  11. public interface IEnumerable<out T>
  12. {
  13. // Returns an IEnumerator for this enumerable Object. The enumerator provides
  14. // a simple way to access all the contents of a collection.
  15. /// <include file='doc\IEnumerable.uex' path='docs/doc[@for="IEnumerable.GetEnumerator"]/*' />
  16. IEnumerator<T> GetEnumerator();
  17. }
  18. }