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

◆ GetByteCount() [4/7]

unsafe override int System.Text.Latin1Encoding.GetByteCount ( char[] chars,
int index,
int count )
inlineinherited

Definition at line 50 of file Latin1Encoding.cs.

51 {
52 if (chars == null)
53 {
54 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.chars, ExceptionResource.ArgumentNull_Array);
55 }
56 if ((index | count) < 0)
57 {
58 ThrowHelper.ThrowArgumentOutOfRangeException((index < 0) ? ExceptionArgument.index : ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
59 }
60 if (chars.Length - index < count)
61 {
62 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.chars, ExceptionResource.ArgumentOutOfRange_IndexCountBuffer);
63 }
64 fixed (char* ptr = chars)
65 {
66 return GetByteCountCommon(ptr + index, count);
67 }
68 }
unsafe int GetByteCountCommon(char *pChars, int charCount)

References System.chars, System.count, System.Text.Latin1Encoding.GetByteCountCommon(), System.index, System.ThrowHelper.ThrowArgumentNullException(), and System.ThrowHelper.ThrowArgumentOutOfRangeException().