Whetstone Class reference
Whetstone Class reference
Whetstone
WhetStone Namespaces
WhetStone.Looping
cache Class
cache Methods
Cache Method
Cache(T) Method (IEnumerable(T), Nullable(Int32))
Cache(T) Method (IList(T), Nullable(Int32))
cache
Cache
T
Method (IEnumerable
T
, Nullable
Int32
)
Caches the
IEnumerable
T
, causing it to enumerate once at most.
Namespace:
WhetStone.Looping
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
Copy
public
static
IList
<T>
Cache
<T>(
this
IEnumerable
<T>
this
,
Nullable
<
int
>
bound
=
null
)
Parameters
this
Type:
System.Collections.Generic
IEnumerable
T
The
IEnumerable
T
to be cached.
bound
(Optional)
Type:
System
Nullable
Int32
If set to an integer, only that number of elements will be cached.
Type Parameters
T
The type of the
IEnumerable
T
.
Return Value
Type:
IList
T
A new structure, wrapping
this
and storing its elements as they are enumerated.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerable
T
. 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
cache Class
Cache Overload
WhetStone.Looping Namespace