Class Slice
- Namespace
- NAPS2.ImportExport
- Assembly
- NAPS2.Sdk.dll
A class that represents a Python-style slice of a collection. https://stackoverflow.com/questions/509211/understanding-pythons-slice-notation/509295#509295
For example, "2:-3" gets all but the first 2 and last 3 items. Stepping is supported too, as in "::2" which gets every other item.
public class Slice
- Inheritance
-
Slice
- Inherited Members
Fields
Default
public static readonly Slice Default
Field Value
Properties
End
public int? End { get; }
Property Value
- int?
Index
public int? Index { get; }
Property Value
- int?
Start
public int? Start { get; }
Property Value
- int?
Step
public int? Step { get; }
Property Value
- int?
Methods
Indices(int)
public IEnumerable<int> Indices(int collectionLength)
Parameters
collectionLength
int
Returns
Item(int?)
public static Slice Item(int? index)
Parameters
index
int?
Returns
Parse(string, out string)
public static Slice Parse(string input, out string rest)
Parameters
Returns
Range(int?, int?, int?)
public static Slice Range(int? start, int? end, int? step)