ArrayShapeEncoder.Shape(Int32, ImmutableArray<Int32>, ImmutableArray<Int32>) 方法

定义

对数组形状进行编码。Encodes array shape.

public:
 void Shape(int rank, System::Collections::Immutable::ImmutableArray<int> sizes, System::Collections::Immutable::ImmutableArray<int> lowerBounds);
public void Shape (int rank, System.Collections.Immutable.ImmutableArray<int> sizes, System.Collections.Immutable.ImmutableArray<int> lowerBounds);
member this.Shape : int * System.Collections.Immutable.ImmutableArray<int> * System.Collections.Immutable.ImmutableArray<int> -> unit
Public Sub Shape (rank As Integer, sizes As ImmutableArray(Of Integer), lowerBounds As ImmutableArray(Of Integer))

参数

rank
Int32

数组中的维数(应大于等于 1)。The number of dimensions in the array (shall be 1 or more).

sizes
ImmutableArray<Int32>

维度大小。Dimension sizes. 数组可能比 rank 短,但不能比它长。The array may be shorter than rank but not longer.

lowerBounds
ImmutableArray<Int32>

维度下限;若将所有 rank 下限都设为 0,则为 default(ImmutableArray<T>)。Dimension lower bounds, or default(ImmutableArray<T>) to set all rank lower bounds to 0. 数组可能比 rank 短,但不能比它长。The array may be shorter than rank but not longer.

例外

rank 超出范围 [1, 0xffff],小于 sizes.Length 或小于 lowerBounds.Lengthrank is outside of range [1, 0xffff], smaller than sizes.Length, or smaller than lowerBounds.Length.

sizesnullsizes is null.

适用于