User Info - potatoscript/csharp GitHub Wiki
Get IP address
using System.Net;
using System.Net.Sockets;
private string IP()
{
IPHostEntry host;
string localIP = "?";
host = Dns.GetHostEntry(Dns.GetHostName());
foreach( IPAddress ip in host.AddressList)
{
if(ip.AddressFamily.ToString() == "InterNetwork")
{
localIP = ip.ToString();
}
}
return localIP;
}
Get User PC's Name
var name = System.Environment.MachineName;