Home > DeveloperSection > Interviews > Explain about Visual basic.NET culture?

Posted on    March-28-2011 9:18 AM

 VB.Net
Ratings:
 4 Answer(s)
  1318  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
Posted on    March-28-2011 12:00 AM

VB was always a RAD tool and it was always user friendly for any type of user whether professional or not. It also provided many users with shortcuts and features which made this language popular among many users. It had its share of debugging and maintenance issues of course.

Amit Singh

Total Post:565

Points:2825
Posted on    March-29-2011 12:00 AM

Check this useful link
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28v=vs.71%29.aspx

Amit Singh

Total Post:565

Points:2825
Posted on    March-29-2011 12:00 AM

One of the first things to understand is that culture information is maintained by the current Windows thread in the value of Thread.CurrentCulture. So to check for the culture in a given Windows environment, use this code ...

 

Imports System.Threading
Public Class Form1
   Private Sub Button1_Click( _
      ByVal sender As System.Object, _
      ByVal e As System.EventArgs) _
      Handles Button1.Click
      MessageBox.Show( _
         Thread.CurrentThread.CurrentCulture.ToString)
   End Sub
End Class

On my computer, this gives a result of "en-US". If I change the value to Slovenian in Windows XP, (Start > Control Panel > Date, Time, Language and Regional Options > Regional and Language Options, the program reports "sl-SI" instead.

To set the value of CurrentCulture to a given culture using VB.NET, just assign the correct value. Technically, this creates a new, neutral object and then assigns "Slovenian" to it. Since this only affects the current thread, the culture settings of the computer aren't changed.


Amit Singh

Total Post:565

Points:2825
Posted on    March-29-2011 12:00 AM

Check this link
http://www.startvbdotnet.com/language/

Don't want to miss updates? Please click the below button!

Follow MindStick