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

◆ GetMaxByteCount()

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

Definition at line 118 of file Latin1Encoding.cs.

119 {
120 if (charCount < 0)
121 {
122 throw new ArgumentOutOfRangeException("charCount", SR.ArgumentOutOfRange_NeedNonNegNum);
123 }
124 long num = (long)charCount + 1L;
125 if (base.EncoderFallback.MaxCharCount > 1)
126 {
127 num *= base.EncoderFallback.MaxCharCount;
128 }
129 if (num > int.MaxValue)
130 {
131 throw new ArgumentOutOfRangeException("charCount", SR.ArgumentOutOfRange_GetByteCountOverflow);
132 }
133 return (int)num;
134 }

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