GetMaxByteCount()

Encoding::GetMaxByteCount(int) method

Get the maximum number of bytes needed to encode a specified number of characters.

virtual int System::Text::Encoding::GetMaxByteCount(int char_count)=0

Arguments

ParameterTypeDescription
char_countintNumber of characters to encode.

Return Value

Number of bytes sufficient to encode any string of given character length.

See Also