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 (Stream, Nullable
Int32
)
Get a
Stream
'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
<
byte
>
Loop
(
this
Stream
this
,
Nullable
<
int
>
cache
=
null
)
Parameters
this
Type:
System.IO
Stream
The
Stream
to read from
cache
(Optional)
Type:
System
Nullable
Int32
The maximum cache size (only storing the first-most members). Setting to 0 is an infinite cache, setting to less is no cache. setting to
means decide by whether
CanSeek
.
Return Value
Type:
IEnumerable
Byte
A (possibly cached)
IEnumerable
T
of bytes from
this
.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Stream
. 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