c# - CS0029:无法在 C#/Specflow 中将类型列表转换为数组
问题描述
我收到以下错误:
错误 CS0029 无法隐式转换类型你能帮我解决它吗?我已经尝试了很多东西,但我无法解决..提前谢谢你。
解决方案
似乎AddUpdateData
是 type CountryStateData[]
,但您提供的是List<CountryStateData>
.
所以提供一个数组
ManageCountryStatesData returnValue = services.BackendService.CountryManageCountryStates(services.ApiKey, services.SessionKey,
new ManageCountryStatesOptions()
{
AddUpdateData = new CountryStateData[1] { myState }
});
推荐阅读
- mysql - 错误:操作数应包含 1 列
- wordpress - wordpress wp_mail 抛出错误:无法实例化邮件功能
- fortran - 从模块中,仅使用派生数据类型的某些组件
- android - 如何从 Jetpack Compose TextField 关闭虚拟键盘?
- java - 将元素插入排序数组
- jquery - 背景图像在 Iphone 和 ipad 中看起来被拉伸
- c++ - 在字符串中查找多个子字符串时遇到问题
- javascript - 通过javascript计算数字类型输入字段的总和
- scala - 如何从 Spark Scala 中的案例类映射数组
- python - 来自单个字段数组的结构化数组(python,numpy)