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

◆ GetMaxByteCount() [2/2]

override int System.Text.OSEncoding.GetMaxByteCount ( int charCount)
inline

Definition at line 198 of file OSEncoding.cs.

199 {
200 if (charCount < 0)
201 {
202 throw new ArgumentOutOfRangeException("charCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
203 }
204 long num = (long)charCount * 14L;
205 if (num > int.MaxValue)
206 {
207 throw new ArgumentOutOfRangeException("charCount", System.SR.ArgumentOutOfRange_GetByteCountOverflow);
208 }
209 return (int)num;
210 }
static string ArgumentOutOfRange_GetByteCountOverflow
Definition SR.cs:88
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7

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