ArrayShapeEncoder.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 或多個)。

sizes
ImmutableArray<Int32>

維度大小。 陣列可能會比 rank 短,但不能長。

lowerBounds
ImmutableArray<Int32>

維度下限範圍,或預設值 (ImmutableArray<T>) 以將所有 rank 下限範圍設為 0。 陣列可能會比 rank 短,但不能較長。

例外狀況

rank 超出範圍 [1, 0xffff]、小於 sizes.Length 或小於 lowerBounds.Length

sizesnull

適用於