C#声明api函数出错

helmo helmo 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
在vs中声明一个对ini文件的写函数
[System.Runtime.InteropServices.DllImport("kernel32")]
private static extern long WritePrivateProfilesString(string section, string key, string val, string filePath);

错误 30 命名空间“System.Runtime.InteropServices”中不存在类型或命名空间名称“DllImport”。是否缺少程序集引用
...全文
评论 1
收藏 已收藏
分享
返回顶部
helmo
.NET技术其他语言 1,979 成员 12,447 内容