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

◆ GetString() [3/4]

unsafe override string System.Text.EncodingNLS.GetString ( byte[] bytes,
int index,
int count )
inlinevirtualinherited

Reimplemented from System.Text.Encoding.

Definition at line 306 of file EncodingNLS.cs.

307 {
308 if (bytes == null)
309 {
310 throw new ArgumentNullException("bytes", System.SR.ArgumentNull_Array);
311 }
312 if (index < 0 || count < 0)
313 {
314 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", System.SR.ArgumentOutOfRange_NeedNonNegNum);
315 }
316 if (bytes.Length - index < count)
317 {
318 throw new ArgumentOutOfRangeException("bytes", System.SR.ArgumentOutOfRange_IndexCountBuffer);
319 }
320 if (bytes.Length == 0)
321 {
322 return string.Empty;
323 }
324 fixed (byte* ptr = &bytes[0])
325 {
326 return GetString(ptr + index, count);
327 }
328 }
static string ArgumentOutOfRange_IndexCountBuffer
Definition SR.cs:78
static string ArgumentNull_Array
Definition SR.cs:24
Definition SR.cs:7
unsafe override string GetString(byte[] bytes, int index, int count)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.bytes, System.count, System.Text.EncodingNLS.GetString(), and System.index.

Referenced by System.Text.EncodingNLS.GetString().