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

◆ GetMaxCharCount()

override int System.Text.ASCIIEncoding.GetMaxCharCount ( int byteCount)
inlineinherited

Definition at line 507 of file ASCIIEncoding.cs.

508 {
509 if (byteCount < 0)
510 {
511 throw new ArgumentOutOfRangeException("byteCount", SR.ArgumentOutOfRange_NeedNonNegNum);
512 }
513 long num = byteCount;
514 if (base.DecoderFallback.MaxCharCount > 1)
515 {
516 num *= base.DecoderFallback.MaxCharCount;
517 }
518 if (num > int.MaxValue)
519 {
520 throw new ArgumentOutOfRangeException("byteCount", SR.ArgumentOutOfRange_GetCharCountOverflow);
521 }
522 return (int)num;
523 }

References System.SR.ArgumentOutOfRange_GetCharCountOverflow, System.SR.ArgumentOutOfRange_NeedNonNegNum, and System.byteCount.