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

◆ PtrToStringAnsi() [2/2]

static unsafe string System.Runtime.InteropServices.Marshal.PtrToStringAnsi ( IntPtr ptr,
int len )
inlinestatic

Definition at line 639 of file Marshal.cs.

640 {
641 if (ptr == IntPtr.Zero)
642 {
643 throw new ArgumentNullException("ptr");
644 }
645 if (len < 0)
646 {
647 throw new ArgumentOutOfRangeException("len", len, SR.ArgumentOutOfRange_NeedNonNegNum);
648 }
649 return new string((sbyte*)(void*)ptr, 0, len);
650 }

References System.SR.ArgumentOutOfRange_NeedNonNegNum, System.len, and System.IntPtr.Zero.