Convert methods change the type of objects.

Methods

As* methods change the static type of the collection but do not enumerate it.
To* methods enumerate the collection and put the items into a different collection type.

MethodsDescriptionQuery expression
AsEnumerableReturns the input typed as IEnumerableN/A
AsQueryableConverts an IEnumerable to IQueryableN/A
CastCasts the elements of a collection to a new typefrom var in words
OfTypeSelects values depending on their ability to be cast to the specified typeN/A
ToArrayConvert a collection to an array (forces query execution)N/A
ToDictionaryPuts elements into a Dictionary<TKey, TValue> based on a key-selector function (forces query execution)N/A
ToListConvert a collection to a List<T> (forces query execution)N/A
ToLookupPuts elements into a Lookup<TKey, TValue> based on a key-selector function (forces query execution)N/A