Skip to content
From an earlier era of this site. Left here for the record.

Get the username of the currently logged in user

If you want to get the username for the currently logged in user you can use the following code;

Public Shared ReadOnly Property Username() As String
    Get
        Return System.Environment.UserName
    End Get
End Property