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

◆ GetBytes() [4/5]

unsafe override int System.Text.EncoderNLS.GetBytes ( char[] chars,
int charIndex,
int charCount,
byte[] bytes,
int byteIndex,
bool flush )
inlineinherited

Definition at line 112 of file EncoderNLS.cs.

113 {
114 if (chars == null || bytes == null)
115 {
116 throw new ArgumentNullException((chars == null) ? "chars" : "bytes", System.SR.ArgumentNull_Array);
117 }
118 if (charIndex < 0 || charCount < 0)
119 {
120 throw new ArgumentOutOfRangeException((charIndex < 0) ? "charIndex" : "charCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
121 }
122 if (chars.Length - charIndex < charCount)
123 {
124 throw new ArgumentOutOfRangeException("chars", System.SR.ArgumentOutOfRange_IndexCountBuffer);
125 }
127 {
128 throw new ArgumentOutOfRangeException("byteIndex", System.SR.ArgumentOutOfRange_Index);
129 }
130 if (chars.Length == 0)
131 {
132 chars = new char[1];
133 }
135 if (bytes.Length == 0)
136 {
137 bytes = new byte[1];
138 }
139 fixed (char* ptr = &chars[0])
140 {
141 fixed (byte* ptr2 = &bytes[0])
142 {
144 }
145 }
146 }
static string ArgumentOutOfRange_Index
Definition SR.cs:30
static string ArgumentOutOfRange_IndexCountBuffer
Definition SR.cs:78
Definition SR.cs:7
unsafe override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, bool flush)
Definition EncoderNLS.cs:93

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_Index, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.byteCount, System.byteIndex, System.bytes, System.charCount, System.charIndex, System.chars, System.Runtime.Serialization.Dictionary, and System.Text.EncoderNLS.GetBytes().