set_Capacity()

CollectionBase::set_Capacity(int32_t) method

Sets the number of elements that the collection can contain.

void System::Collections::CollectionBase<T>::set_Capacity(int32_t value)

Arguments

ParameterTypeDescription
valueint32_tThe value to set.

Exceptions

ExceptionDescription
ArgumentOutOfRangeExceptionThe value is set to a value that is less than CollectionBase::get_Count.
OutOfMemoryExceptionThere is not enough memory available on the system.

See Also