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 116489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:11:10+00:00 2026-05-11T03:11:10+00:00

Afternoon people! I’m trying to implement a list of counties on my Compact Framework

  • 0

Afternoon people!

I’m trying to implement a list of counties on my Compact Framework (Mobile) application.

I can do this easily in the full .Net framework with CultureInfo.GetCultures(..etc). However, the CF seems to be missing this feature?

Is there any way I can return a list of countries (and regions if possible) that I can populate into a ComboBox?

The OS has a list of countries, so there must be a way to do it?

I look forward to hearing back!

  • 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. 2026-05-11T03:11:10+00:00Added an answer on May 11, 2026 at 3:11 am

    How about this?

    using System; using System.Collections.Generic; using System.Globalization; using System.Runtime.InteropServices;  namespace OpenNETCF.Globalization {     public class CultureInfoHelper     {         private delegate int EnumLocalesHandler(string lpLocaleString);          private static EnumLocalesHandler m_localesDelegate;          private static List<CultureInfo> m_cultures;          private static int EnumLocalesProc(string locale)         {             try             {                 m_cultures.Add(CultureInfo.GetCultureInfo(                     int.Parse(locale, NumberStyles.HexNumber)));             }             catch             {                 // failed for this locale - ignore and continue             }              return 1;         }          public static CultureInfo[] GetCultures()         {             if (m_localesDelegate == null)             {                 m_cultures = new List<CultureInfo>();                 m_localesDelegate = new EnumLocalesHandler(EnumLocalesProc);                 IntPtr fnPtr = Marshal.GetFunctionPointerForDelegate(                     m_localesDelegate);                 int success = EnumSystemLocales(fnPtr, LCID_INSTALLED);             }              return m_cultures.ToArray();         }          private const int LCID_INSTALLED = 0x01;         private const int LCID_SUPPORTED = 0x02;          [DllImport('coredll', SetLastError = true)]         private static extern int EnumSystemLocales(             IntPtr lpLocaleEnumProc, uint dwFlags);     } } 

    Usage looks like this:

    using OpenNETCF.Globalization; .... static void Main() {     foreach (CultureInfo ci in CultureInfoHelper.GetCultures())     {                     Debug.WriteLine(string.Format('0x{0:x2}({1}) : {2}', ci.LCID, ci.Name, ci.EnglishName));     } } 

    And output looks like this:

    0x402(bg-BG) : Bulgarian (Bulgaria) 0x403(ca-ES) : Catalan (Catalan) 0x405(cs-CZ) : Czech (Czech Republic) 0x406(da-DK) : Danish (Denmark) 0x407(de-DE) : German (Germany) 0x408(el-GR) : Greek (Greece) 0x409(en-US) : English (United States) ... 0x400a(es-BO) : Spanish (Bolivia) 0x440a(es-SV) : Spanish (El Salvador) 0x480a(es-HN) : Spanish (Honduras) 0x4c0a(es-NI) : Spanish (Nicaragua) 0x500a(es-PR) : Spanish (Puerto Rico) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Afternoon, How would i set this as not equal to? I am basically trying
Afternoon, I'm trying to implement a hashtable in Java, using K mod 13 as
Afternoon, I am trying to return a list of products from my SQL Server
I have been trying to figure this out all afternoon, but have given up
Afternoon all, I've been slaving at this for 2 days trying to fix the
Afternoon good people of Stack Overflow. I am trying to do something that I
Afternoon, So I have been at this one issue for hours and can't really
Afternoon, I would like to know how i can add a class depending on
Afternoon, I am trying to make a simple search, which is working for the
Afternoon all. I have a drop down list in my view <div class=editor-label> @Html.LabelFor(model

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.