Get current user name and with VB.NET

Posted by Marcus Hammarberg on June 27, 2007
I searched a while for this, actually... which is strange since all i wanted to do is to find the current user name and the current user domain.

It's dead simple with the following lines:

Dim userName As String = System.Environment.UserName
Dim userDomain As String = System.Environment.UserDomainName

So if you ever look for how to find the information about the current user - here it is

If you liked this post ... here's more for you:

Published by Marcus Hammarberg on Last updated