Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetMaxByteCount()

override int System.Text.ASCIIEncoding.GetMaxByteCount ( int charCount)
inlineinherited

Definition at line 489 of file ASCIIEncoding.cs.

490 {
491 if (charCount < 0)
492 {
493 throw new ArgumentOutOfRangeException("charCount", SR.ArgumentOutOfRange_NeedNonNegNum);
494 }
495 long num = (long)charCount + 1L;
496 if (base.EncoderFallback.MaxCharCount > 1)
497 {
498 num *= base.EncoderFallback.MaxCharCount;
499 }
500 if (num > int.MaxValue)
501 {
502 throw new ArgumentOutOfRangeException("charCount", SR.ArgumentOutOfRange_GetByteCountOverflow);
503 }
504 return (int)num;
505 }

References System.SR.ArgumentOutOfRange_GetByteCountOverflow, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.charCount, and System.L.