When working on a Winforms or Console application using C# , sometimes you might need to get the computer name where the application is running. How to get the Computer Name in C# ? To retrieve the computer name , one can use the System.Environment.MachineName property as shown below.
Below is a sample code snippet that demonstrates how to get the current computer name using VB.NET? How to Get the Computer Name using VB.NET?