BF2Statistics.ASP.Ip2nation.GetCountyNameFromCode C# (CSharp) Method

GetCountyNameFromCode() public static method

Fethces the full country name from a country code supplied from GetCountryCode()
public static GetCountyNameFromCode ( string Code ) : string
Code string
return string
        public static string GetCountyNameFromCode(string Code)
        {
            try
            {
                using (DatabaseDriver Driver = new DatabaseDriver(DatabaseEngine.Sqlite, ConnectionString))
                {
                    // Fetch country code from Ip2Nation
                    Driver.Connect();
                    List<Dictionary<string, object>> Rows = Driver.Query(
                        "SELECT country FROM ip2nationcountries WHERE iso_code_2 = @P0", Code.ToUpperInvariant()
                    );

                    return (Rows.Count == 0) ? Code: Rows[0]["country"].ToString();
                }
            }
            catch
            {
                return Code;
            }
        }