How do I get the local machine name in C#?

System.Environment.MachineName

It works unless a machine name has more than 15 characters.

Leave a Comment