top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to get the Computer Name in C# ?

0 votes
322 views
How to get the Computer Name in C# ?
posted Jun 16, 2016 by Sathyasree

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
using System;
namespace ACCode
{
    class Program
    {
        static void Main(string[] args)
        {
            var computerName = System.Environment.MachineName;
            Console.WriteLine(computerName);
            Console.ReadLine();
        }
    } 
}
answer Jun 16, 2016 by Shivaranjini
...