public static void Initialize() { using (DatabaseConnection dbConnection = new DatabaseConnection(DatabaseID.Data)) { //method for getting count string query = "SELECT COUNT(level_num) FROM experience"; DataColumnCollection row = dbConnection.Database.RetrieveRow(query); int count = row["COUNT(level_num)"].ValueString.ToInt(); exp = new ExpCollection(count); } }