【发布时间】:2012-11-26 10:13:02
【问题描述】:
我在使用 windows phone 7.1 的 sql-net 和 C# Sqlite 组合时遇到了一些“ref”与“out”关键字错误。这是因为我使用的库组合错误吗?
应用类型:Windows Phone 7.1
使用:
- sql-net 版本 1.0.5,通过 Visual Studio 源 Nuget
- 适用于 WP7 的 C# Sqlite (wp7sqlite) (Community.CSharpSqlite.WP7) 版本 0.1.1,通过 Visual Studio 提供 Nuget 源代码。
我收到的确切错误如下
错误 5 Community.CsharpSqlite.Sqlite3.sqlite3_open(string, ref Community.CsharpSqlite.Sqlite3.sqlite3)' 的最佳重载方法匹配有一些无效参数 C:\Dev\Learning\SQLite.cs 行:2492 列:29
然后下一个错误提示它与作为“out”类型而不是“ref”类型传递的参数有关。
错误 6 参数 2 必须使用“ref”关键字传递 C:\Dev\Learning\SQLite.cs 行:2492 列:64
我可以通过将“out”关键字替换为“ref”关键字来消除编译错误,但这可能会导致其他问题。鉴于我没有看到太多关于这个问题的抱怨 - 我可能做错了什么但无法轻易检测到。
【问题讨论】:
标签: c# linq sqlite windows-phone-7