Friday, 21 December 2012

Find Current Culture in VB.NET


Find Current Culture in VB.NET


Dim t As System.Threading.Thread = System.Threading.Thread.CurrentThread 

'current culture datetime format
Console.WriteLine(t.CurrentCulture.DateTimeFormat.FullDateTimePattern)

'current culture  Name,display name and native name
Console.WriteLine(t.CurrentCulture.NativeName " "
                        t.CurrentCulture.EnglishName " "
                        t.CurrentCulture.DisplayName)

'current culture  Name,display name and native name
 Console.WriteLine(t.CurrentUICulture.NativeName " "  
                        t.CurrentUICulture.EnglishName " "  
                        t.CurrentUICulture.DisplayName)