xamarin - 如何将 ByteArray 从本机 iOS 库导出到 Xamarin 绑定库?
问题描述
本机 iOS 库 API: - void getCamImage(Byte[])data withWidth:(size_t)width withHeight:(size_t)height withStride:(size_t)stride ;
在 Binding DLL 项目中,我尝试了以下操作: [Export("getCamImage:withWidth:withHeight:withStride:")] void GetCamImage(Byte[] buffer, int width, int height, int stride);
尝试使用 byte[] 而不是 Byte[]。出现以下错误:错误 CS0452:类型“字节”必须是引用类型才能将其用作泛型类型或方法“NSArray.FromNSObjects(params T[])”中的参数“T”
问题:如何将 ByteArray 参数导出为?
解决方案
推荐阅读
- javascript - 如何使用 Javascript 交换容器中的 2 个 Div
- reactjs - 有没有办法构建一个包含多个子元素的 React 组件作为一个表达式?
- solidity - 如何解决重复进口导致的报关错误?
- node.js - ts-node-dev 没有正确重新加载子模块
- python - 从字典创建数据框时优化性能
- reactjs - 如何在 Laravel 中创建一个 React 包并在不发布的情况下重用其组件?
- html - 我需要使用 CSS 和/或引导程序来减小移动设备的框和图像大小
- python-sphinx - 如何连续编号 Sphinx 中的方程(不同的 rst 文件)
- barbajs - 导航到慢速网络上的其他页面时页面重新加载。巴巴.js
- lua - Roblox:如何编写 VectorForce 脚本