IVector<TValue>.resize 方法

定义

更改容器可以容纳的元素数。Changes the number of elements that the container can hold.

重载

resize(Int32)

将容器中的元素数更改为指定大小。Changes the number of elements in the container to the specified size.

resize(Int32, TValue)

将容器中的元素数更改为指定大小。Changes the number of elements in the container to the specified size. 如果新大小大于旧大小,则该方法将追加值为 _Val 的元素。If the new size is larger than the old size, the method appends elements that have value _Val.

注解

有关详细信息,请参阅vector:: resize (STL/CLR)For more information, see vector::resize (STL/CLR).

resize(Int32)

将容器中的元素数更改为指定大小。Changes the number of elements in the container to the specified size.

public:
 void resize(int _Newsize);
public void resize (int _Newsize);
abstract member resize : int -> unit
Public Sub resize (_Newsize As Integer)

参数

_Newsize
Int32

受控序列的新大小。The new size of the controlled sequence.

注解

有关详细信息,请参阅vector:: resize (STL/CLR)For more information, see vector::resize (STL/CLR).

resize(Int32, TValue)

将容器中的元素数更改为指定大小。Changes the number of elements in the container to the specified size. 如果新大小大于旧大小,则该方法将追加值为 _Val 的元素。If the new size is larger than the old size, the method appends elements that have value _Val.

public:
 void resize(int _Newsize, TValue _Val);
public void resize (int _Newsize, TValue _Val);
abstract member resize : int * 'Value -> unit
Public Sub resize (_Newsize As Integer, _Val As TValue)

参数

_Newsize
Int32

受控序列的新大小。The new size of the controlled sequence.

_Val
TValue

要插入的元素的值。The value of the elements to insert.

注解

有关详细信息,请参阅vector:: resize (STL/CLR)For more information, see vector::resize (STL/CLR).

适用于