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

◆ PtrToStringUTF8() [2/2]

static unsafe string System.Runtime.InteropServices.Marshal.PtrToStringUTF8 ( IntPtr ptr,
int byteLen )
inlinestatic

Definition at line 684 of file Marshal.cs.

685 {
686 if (ptr == IntPtr.Zero)
687 {
688 throw new ArgumentNullException("ptr");
689 }
690 if (byteLen < 0)
691 {
692 throw new ArgumentOutOfRangeException("byteLen", byteLen, SR.ArgumentOutOfRange_NeedNonNegNum);
693 }
694 return string.CreateStringFromEncoding((byte*)(void*)ptr, byteLen, Encoding.UTF8);
695 }
static Encoding UTF8
Definition Encoding.cs:526

References System.SR.ArgumentOutOfRange_NeedNonNegNum, System.Text.Encoding.UTF8, and System.IntPtr.Zero.