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

◆ GetMaxCharCount()

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

Definition at line 901 of file DBCSCodePageEncoding.cs.

902 {
903 if (byteCount < 0)
904 {
905 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
906 }
907 long num = (long)byteCount + 1L;
908 if (base.DecoderFallback.MaxCharCount > 1)
909 {
910 num *= base.DecoderFallback.MaxCharCount;
911 }
912 if (num > int.MaxValue)
913 {
914 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_GetCharCountOverflow);
915 }
916 return (int)num;
917 }
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, and System.L.