"ref" vs "out" keyword errors using the sql-net and C# Sqlite combination for windows phone 7.1
Posted
by
param
on Stack Overflow
See other posts from Stack Overflow
or by param
Published on 2012-11-26T10:13:02Z
Indexed on
2012/11/26
11:04 UTC
Read the original article
Hit count: 287
I am getting some "ref" vs "out" keyword errors using the sql-net and C# Sqlite combination for windows phone 7.1. Is this due to a wrong combination of libraries that I am using?
App Type: Windows Phone 7.1 Using: 1) sql-net Version 1.0.5, Source Nuget thru Visual Studio 2) C# Sqlite for WP7 (wp7sqlite) ( Community.CSharpSqlite.WP7) Version 0.1.1, Source Nuget thru Visual Studio.
The exact error I receive is below **Error 5 The best overloaded method match for Community.CsharpSqlite.Sqlite3.sqlite3_open(string, ref Community.CsharpSqlite.Sqlite3.sqlite3)' has some invalid arguments C:\Dev\Learning\SQLite.cs Line:2492 Column: 29 **
The next error then hints that it is related to the parameter being passed as "out" type instead of "ref" type.
Error 6 Argument 2 must be passed with the 'ref' keyword C:\Dev\Learning\SQLite.cs Line: 2492 Column: 64
I can make the compile errors go away by replacing the "out" keyword with the "ref" keyword, but that is likely to lead to other issues. Given that I do not see much complain about this issue - I may be doing something wrong but not able to detect easily.
Thanks, Parmeshwar
© Stack Overflow or respective owner