使用数据库(DB) / 连接到数据库

using System;
using System.Data.SQLite;

var conStr = "Data Source=/DatabasePath/DatabaseName.db;Version=3;";

using var conn = new SQLiteConnection(conStr);
conn.Open();

var command = conn.CreateCommand();
command.CommandText = @"
  SELECT
    Language, Percentage
  FROM countrylanguage
  WHERE CountryCode = 'RUS'
  ORDER BY Percentage DESC";
var reader = command.ExecuteReader();
// Get the data
if (!reader.Read()) {
    return;
}

Console.WriteLine(reader.GetString(0) + ": " +
    reader.GetFloat(1));