System.AppContext.BaseDirectory    指放在当前项目下

var dbPath = Path.Combine(System.AppContext.BaseDirectory, “MyDatabase.db”);

//创建数据文件
SQLiteConnection.CreateFile(dbPath);

打开数据连接
m_dbConnection = new SQLiteConnection(@”Data Source=”+ dbPath + “;Version=3;”);
m_dbConnection.Open();

www.npspro.cn软师兄
软师兄 » C# SQLite连接数据库文件及路径
50T免费网盘资源大集合【持续更中~~~~】:点击查看