 | sliceSliceT Method (IListT, Int32, NullableInt32, Int32, NullableInt32) |
Namespace:
WhetStone.Looping
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntaxpublic static IList<T> Slice<T>(
this IList<T> this,
int start,
Nullable<int> max = null,
int steps = 1,
Nullable<int> length = null
)
Parameters
- this
- Type: System.Collections.GenericIListT
The IListT to slice. - start
- 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:
IListTA 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
IListT. 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