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

◆ GetMaxCharCount()

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

Definition at line 593 of file SBCSCodePageEncoding.cs.

594 {
595 if (byteCount < 0)
596 {
597 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
598 }
599 long num = byteCount;
600 if (base.DecoderFallback.MaxCharCount > 1)
601 {
602 num *= base.DecoderFallback.MaxCharCount;
603 }
604 if (num > int.MaxValue)
605 {
606 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_GetCharCountOverflow);
607 }
608 return (int)num;
609 }
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, and System.byteCount.