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

◆ GetMaxByteCount()

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

Definition at line 706 of file UTF7Encoding.cs.

707 {
708 if (charCount < 0)
709 {
710 throw new ArgumentOutOfRangeException("charCount", SR.ArgumentOutOfRange_NeedNonNegNum);
711 }
712 long num = (long)charCount * 3L + 2;
713 if (num > int.MaxValue)
714 {
715 throw new ArgumentOutOfRangeException("charCount", SR.ArgumentOutOfRange_GetByteCountOverflow);
716 }
717 return (int)num;
718 }

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