Get current user name and with VB.NET

Posted by Marcus Hammarberg on June 27, 2007
Stats
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

Published by Marcus Hammarberg on Last updated