System::Runtime::InteropServices::Marshal::PtrToStringAuto method

Marshal::PtrToStringAuto(IntPtr) method

Creates a managed String from an unmanaged zero-terminated string.

static String System::Runtime::InteropServices::Marshal::PtrToStringAuto(IntPtr ptr)
ParameterTypeDescription
ptrIntPtrPointer to the unmanaged string.

ReturnValue

A managed string.

See Also

Marshal::PtrToStringAuto(IntPtr, int) method

Creates a managed String from an unmanaged string.

static String System::Runtime::InteropServices::Marshal::PtrToStringAuto(IntPtr ptr, int length)
ParameterTypeDescription
ptrIntPtrPointer to the unmanaged string.
lengthintLength of the unmanaged string.

ReturnValue

A managed string.

See Also