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

◆ GetMaxCharCount()

override int System.Text.ISCIIEncoding.GetMaxCharCount ( int byteCount)
inline

Definition at line 490 of file ISCIIEncoding.cs.

491 {
492 if (byteCount < 0)
493 {
494 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
495 }
496 long num = (long)byteCount + 1L;
497 if (base.DecoderFallback.MaxCharCount > 1)
498 {
499 num *= base.DecoderFallback.MaxCharCount;
500 }
501 if (num > int.MaxValue)
502 {
503 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_GetCharCountOverflow);
504 }
505 return (int)num;
506 }
static string ArgumentOutOfRange_GetCharCountOverflow
Definition SR.cs:90
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7

References System.SR.ArgumentOutOfRange_GetCharCountOverflow, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.byteCount, System.Runtime.Serialization.Dictionary, and System.L.