Console Application Issues

Shook1s

New member
Joined
Jul 22, 2004
Messages
2
Programming Experience
Beginner
Greetings All,

I used the following in a Windows Based Application and It works fine.

Imports System.Security.Principal.WindowsPrincipal

and then used Msgbox(SystemInformation.Username) to popup the current user name. When I tried doing a console.writeline(systeminformation.username) it does not work.

Any suggestions???
 
Try this
VB.NET:
Expand Collapse Copy
[size=2]Console.WriteLine(System.Environment.UserName)
It gives the current username of the system
[/size]
 
Back
Top