CSharp examples for System.Globalization:Country
Get Two letter name for all Countries
// Copyright (c) Clickberry, Inc. All rights reserved. using System.Linq; using System.Globalization; using System.ComponentModel.DataAnnotations; using System.Collections.Generic; using System;/*from w ww . j a va2s. c o m*/ public class Main{ private static IEnumerable<string> GetCountries() { return from ri in from ci in CultureInfo.GetCultures(CultureTypes.SpecificCultures) select new RegionInfo(ci.LCID) group ri by ri.TwoLetterISORegionName into g select g.Key; } }