关于C#集合接口继承关系

684 阅读1分钟

IEnumerable IEnumerable<T>

命名空间:System.Collections

public interface IEnumerable

公开枚举数,该枚举数支持在非泛型集合上进行简单迭代。

命名空间:System.Collections.Generic

public interface IEnumerable<out T> : IEnumerable

公开枚举数,该枚举数支持在指定类型的集合上进行简单迭代。

IEnumerator IEnumerator<T>

命名空间:System.Collections

public interface IEnumerator

支持对非泛型集合的简单迭代。

命名空间:System.Collections.Generic

public interface IEnumerator<out T> : IEnumerator, IDisposable

支持在泛型集合上进行简单迭代。

ICollection<T>

命名空间:System.Collections.Generic

public interface ICollection<T> : IEnumerable<T>, IEnumerable

定义操作泛型集合的方法。

IList<T>

命名空间:System.Collections.Generic

public interface IList<T> : ICollection<T>, IEnumerable<T>, IEnumerable

表示可按照索引单独访问的对象的集合。

IQueryable IQueryable<T>

命名空间:System.Linq

public interface IQueryable : IEnumerable

提供针对特定数据源(其中数据类型未指定)评估查询的功能。

public interface IQueryable<out T> : IEnumerable<T>, IEnumerable, IQueryable

提供针对特定数据源(其中数据类型未未知)评估查询的功能。