Support Forums

Full Version: Get Country Code In 1 Line Of Code.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Code:
Public Shared Function CountryCode() As String
        [b]Return RegionInfo.CurrentRegion.ThreeLetterISORegionName[/b]
    End Function

here I have just put it as a function.

maybe you can find a good use for this.

As I have still seen people using 10s of line of code for something that can be done in 1 line.

Non
Thanks bro. Ive never seen this used before Tongue
Wow, thanks for the share BlaiR.. I will use this Smile
Wow, I didn't know this was so simple. Thanks for the share, might have to use this in my future projects. Tongue
Nice and simple thanks :3
You May Also Use.

Code:
RegionInfo.CurrentRegion.EnglishName

To Return "United Kingdom", "Canada" Etc.
Thanks for this share Blair
I love this, I use it all the time Big Grin And, you put BBCode inside the code :/
This is easy as hell , thank you for sharing Smile
(08-13-2010, 03:52 AM).Nielz Wrote: [ -> ]This is easy as hell , thank you for sharing Smile

No Problem.

Smile
Pages: 1 2