 | sliceSliceT Method (IEnumerableT, Int32, NullableInt32, Int32, NullableInt32) |
Namespace:
WhetStone.Looping
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntaxpublic static IEnumerable<T> Slice<T>(
this IEnumerable<T> this,
int start = 0,
Nullable<int> max = null,
int steps = 1,
Nullable<int> length = null
)
Parameters
- this
- Type: System.Collections.GenericIEnumerableT
The IListT to slice. - start (Optional)
- Type: SystemInt32
The first index of the section to return. - max (Optional)
- Type: SystemNullableInt32
The last index of the section to return. Exclusive. If this is set, length must not be set. - steps (Optional)
- Type: SystemInt32
The step, in indices between the indices of the section. - length (Optional)
- Type: SystemNullableInt32
The number of items in the section. If this is set, max must not be set.
Type Parameters
- T
- The type of the IListT.
Return Value
Type:
IEnumerableTA mutability-passing slice of
this.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. 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