Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6347233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:10:29+00:00 2026-05-24T21:10:29+00:00

I was thinking of using RegionInfo.TwoLetterISORegionName to as a database attribute from which to

  • 0

I was thinking of using RegionInfo.TwoLetterISORegionName to as a database attribute from which to get information about a country. Until I saw RegionInfoGeoId, which seems more robust.

Which would you store to support internationalization? How would you create a RegionInfo from a GeoId?

Cheers,
Berryl

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:10:30+00:00Added an answer on May 24, 2026 at 9:10 pm

    Using P/Invoke and the GetGeoInfo function, you can get some information from a GeoID:

        public static string GetGeoInfo(int geoId, SYSGEOTYPE geoType)
        {
            string s = new string('\0', 256);
            int size = GetGeoInfo(geoId, geoType, s, 256, 0);
            if (size <= 0)
                return null;
    
            return s.Substring(0, size - 1);
        }
    
        public enum SYSGEOTYPE
        {
            GEO_NATION = 0x0001,
            GEO_LATITUDE = 0x0002,
            GEO_LONGITUDE = 0x0003,
            GEO_ISO2 = 0x0004,
            GEO_ISO3 = 0x0005,
            GEO_RFC1766 = 0x0006,
            GEO_LCID = 0x0007,
            GEO_FRIENDLYNAME = 0x0008,
            GEO_OFFICIALNAME = 0x0009,
            GEO_TIMEZONES = 0x000A,
            GEO_OFFICIALLANGUAGES = 0x000B
        }
    
        [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        private extern static int GetGeoInfo(int geoId, SYSGEOTYPE geoType, string lpGeoData, int cchData, int language);
    

    But, beware, you may not have a 1:1 correspondence between a Geographic location and a Region.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm thinking about using Redis as a store for some highly transient data (we're
I'm thinking about using the java application object to implement a simple cache, to
I am thinking about using Gears in a project, but I have doubts about
I'm thinking about using a ViewFlipper for an Wizard like Activity. But I see
I've been thinking about using shared pointers, and I know how to implement one
I was thinking about using ccache with gcc compiled code on the team wide
I was thinking about using an existing remotely connected svn repositories infrastructure as a
I'm thinking about using custom attributes in Jquery to avoid using class or id
I was thinking about using Singleton pattern in my project, so I searched StackOverflow
My company are thinking about using Mono for an upcoming product, so we were

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.