Whetstone Class reference
Whetstone Class reference
Whetstone
WhetStone Namespaces
WhetStone.Streams
loop Class
loop Methods
Loop Method
Loop Method (Stream, Nullable(Int32))
Loop Method (TextReader, Int32, Int32)
loop
Loop Method (TextReader, Int32, Int32)
Get a
TextReader
's contents as an
IEnumerable
T
.
Namespace:
WhetStone.Streams
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
Copy
public
static
IEnumerable
<
string
>
Loop
(
this
TextReader
this
,
int
length
= 0,
int
cache
= 0 )
Parameters
this
Type:
System.IO
TextReader
The
TextReader
to read from.
length
(Optional)
Type:
System
Int32
The length of each element in the returned
IEnumerable
T
. Setting to 0 or less will chunk the elements by lines.
cache
(Optional)
Type:
System
Int32
The maximum cache size (only storing the first-most members). Setting to 0 is an infinite cache, setting to less is no cache.
Return Value
Type:
IEnumerable
String
A (possibly cached)
IEnumerable
T
of parts of
this
.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
TextReader
. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic)
or
Extension Methods (C# Programming Guide)
.
See Also
Reference
loop Class
Loop Overload
WhetStone.Streams Namespace