System.GetUserName
Skip to content
mnscript
string System.GetUserName() 

Description ​

Returns the username logged in to the terminal

Returns ​

string - The logged in username

Example ​

msc
using System;
using Console;

string username = System.GetUserName();
Console.WriteLine("The logged in user is: "..username);