private unsafe static IntPtr CreateWithCharacters(IntPtr handle, string str, bool autorelease = false) { fixed(char *value = str) { handle = IntPtr_objc_msgSend_IntPtr_nint(handle, selInitWithCharactersLengthHandle, (IntPtr)(void *)value, str.Length); if (autorelease) { NSObject.DangerousAutorelease(handle); } return(handle); } }