string pcName = Environment.MachineName;
و یا :

using System.Net;
string pcName = Dns.GetHostName();