Edit

Share via


MetadataBuilder.SetCapacity Method

Definition

Overloads

SetCapacity(HeapIndex, Int32)

Sets the capacity of the specified heap.

SetCapacity(TableIndex, Int32)

Sets the capacity of the specified table.

SetCapacity(HeapIndex, Int32)

Source:
MetadataBuilder.Heaps.cs
Source:
MetadataBuilder.Heaps.cs
Source:
MetadataBuilder.Heaps.cs

Sets the capacity of the specified heap.

public:
 void SetCapacity(System::Reflection::Metadata::Ecma335::HeapIndex heap, int byteCount);
public void SetCapacity (System.Reflection.Metadata.Ecma335.HeapIndex heap, int byteCount);
member this.SetCapacity : System.Reflection.Metadata.Ecma335.HeapIndex * int -> unit
Public Sub SetCapacity (heap As HeapIndex, byteCount As Integer)

Parameters

heap
HeapIndex

The heap index.

byteCount
Int32

The number of bytes.

Exceptions

heap is not a valid heap index.

-or-

byteCount is negative.

Remarks

Use this method to reduce allocations if the approximate number of bytes is known ahead of time.

Applies to

SetCapacity(TableIndex, Int32)

Source:
MetadataBuilder.Tables.cs
Source:
MetadataBuilder.Tables.cs
Source:
MetadataBuilder.Tables.cs

Sets the capacity of the specified table.

public:
 void SetCapacity(System::Reflection::Metadata::Ecma335::TableIndex table, int rowCount);
public void SetCapacity (System.Reflection.Metadata.Ecma335.TableIndex table, int rowCount);
member this.SetCapacity : System.Reflection.Metadata.Ecma335.TableIndex * int -> unit
Public Sub SetCapacity (table As TableIndex, rowCount As Integer)

Parameters

table
TableIndex

The table index.

rowCount
Int32

The number of rows in the table.

Exceptions

table is not a valid table index.

-or-

rowCount is negative.

Remarks

Use this method to reduce allocations if the approximate number of rows is known ahead of time.

Applies to