System::Runtime::InteropServices::Marshal::PtrToStringUTF8 method

Marshal::PtrToStringUTF8(IntPtr) method

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

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

ReturnValue

A managed string.

See Also

Marshal::PtrToStringUTF8(IntPtr, int) method

Creates a managed String from an unmanaged UTF8-string.

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

ReturnValue

A managed string.

See Also