Get Windows language from current user


I’m trying to get the language from Windows from the current user. Now did I found that I can find that in the register, so I use this in an assign:

Microsoft.Win32.Registry.GetValue("HKEY_CURRENT_USER\Control Panel\Desktop\", "PreferredUILanguages", "")

It returns me an object and in the object stands the following:
string[1] {"nl-NL"}

How do I get that to a normal string? Because when I do that with .tostring I just get System.String


Then I got the message that a late binding isn’t allowed because Option Strict On

CType(langVar, String())(0).ToString

Thanks, that’s what I was looking for.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.