TileCook.MBTilesCache.GetVersion C# (CSharp) Method

GetVersion() private method

private GetVersion ( ) : string
return string
        private string GetVersion()
        {
            using (SQLiteConnection con = new SQLiteConnection((string.Format("Data Source={0}", this.Database))))
            {
                con.Open();
                string query = "SELECT value FROM metadata WHERE name='version'";
                using (SQLiteCommand cmd = new SQLiteCommand(query, con))
                {
                    using (SQLiteDataReader dr = cmd.ExecuteReader())
                    {
                        string version = null;;
                        if (dr.Read())
                        {
                            version = dr.GetString(0);
                        }
                        return version;
                    }
                }
            }
        }