MetadataBuilder.SetCapacity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
Remarks
Use this method to reduce allocations if the approximate number of rows is known ahead of time.