Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Country Code In 1 Line Of Code.
#1
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
Reply
#2
Thanks bro. Ive never seen this used before Tongue
[Image: blanktemplate.png]
Reply
#3
Wow, thanks for the share BlaiR.. I will use this Smile
Reply
#4
Wow, I didn't know this was so simple. Thanks for the share, might have to use this in my future projects. Tongue
Reply
#5
Nice and simple thanks :3
Reply
#6
You May Also Use.

Code:
RegionInfo.CurrentRegion.EnglishName

To Return "United Kingdom", "Canada" Etc.
Reply
#7
Thanks for this share Blair
SUPPORTFORUMS HELPER
Reply
#8
I love this, I use it all the time Big Grin And, you put BBCode inside the code :/
Reply
#9
This is easy as hell , thank you for sharing Smile
My only goal is to help other people .
[Image: gNQgw]
How to make a Photo Viewer [HQ]
Reply
#10
(08-13-2010, 03:52 AM).Nielz Wrote: This is easy as hell , thank you for sharing Smile

No Problem.

Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Request] - Convert Excel formula to VB6 Code Carb0n F1ber 15 6,848 05-18-2015, 11:46 PM
Last Post: longwest
  VB 2008 - Useful Code Apache 36 16,068 11-25-2012, 10:37 PM
Last Post: ƃu∀ ıʞƃu∀
  Crypter code source - project files [ vb.net ] rid47 2 2,503 09-08-2012, 04:17 PM
Last Post: spesificrelax
  Code Challenge - Created by Ace AceInfinity 5 1,715 04-24-2012, 10:27 AM
Last Post: AceInfinity
  Junk Code Project [Source] Digital-Punk 5 2,044 10-23-2011, 07:59 PM
Last Post: SO_TIRED

Forum Jump:


Users browsing this thread: 3 Guest(s)