2017-09-06 111 views

回答

2

找到System.Data.SQLite源代码。正是这样:

/// <summary> 
/// Creates a database file. This just creates a zero-byte file which SQLite 
/// will turn into a database when the file is opened properly. 
/// </summary> 
/// <param name="databaseFileName">The file to create</param> 
static public void CreateFile(string databaseFileName) 
{ 
    FileStream fs = File.Create(databaseFileName); 
    fs.Close(); 
}