Completely consumes the given sequence. This method uses immediate execution,
and doesn't store any data during execution.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static void Consume<T>( this IEnumerable<T> source )
<ExtensionAttribute> _ Public Shared Sub Consume(Of T) ( _ source As IEnumerable(Of T) _ )
public: [ExtensionAttribute] generic<typename T> static void Consume( IEnumerable<T>^ source )
Generic Template Parameters
- T
- Element type of the sequence
Parameters
- source (IEnumerable<(Of <(<'T>)>)>)
- Source to consume
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.
Assembly: MoreLinq (Module: MoreLinq.dll) Version: 1.0.16006.0 (1.0.16006.1845)