Index.Range 方法

定义

重载

Range(DataType dataType)

Returns an instance of RangeIndex class with specified DataType.

Here is an example to create RangeIndex instance passing in the DataType:

RangeIndex rangeIndex = Index.Range(DataType.Number);
</code></pre></p>

Range(DataType dataType, int precision)

Returns an instance of RangeIndex class with specified DataType and precision.

Here is an example to create RangeIndex instance passing in the DataType and precision:

RangeIndex rangeIndex = Index.Range(DataType.Number, -1);
</code></pre></p>

Range(DataType dataType)

Returns an instance of RangeIndex class with specified DataType.

Here is an example to create RangeIndex instance passing in the DataType:

RangeIndex rangeIndex = Index.Range(DataType.Number);
</code></pre></p>

public static RangeIndex Range(DataType dataType)

参数

dataType
DataType

the data type.

返回

an instance of RangeIndex type.

Range(DataType dataType, int precision)

Returns an instance of RangeIndex class with specified DataType and precision.

Here is an example to create RangeIndex instance passing in the DataType and precision:

RangeIndex rangeIndex = Index.Range(DataType.Number, -1);
</code></pre></p>

public static RangeIndex Range(DataType dataType, int precision)

参数

dataType
DataType

specifies the target data type for the index path specification.

precision
int

specifies the precision to be used for the data type associated with this index.

返回

an instance of RangeIndex type.

适用于