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

◆ GetMaxCharCount() [2/2]

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

Definition at line 212 of file OSEncoding.cs.

213 {
214 if (byteCount < 0)
215 {
216 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
217 }
218 long num = byteCount * 4;
219 if (num > int.MaxValue)
220 {
221 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_GetCharCountOverflow);
222 }
223 return (int)num;
224 }
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.