How to Get Computer Name in C#/CSharp

To get computer name in C#/CSharp, we make use of Environment class and its property MachineName.  Example is given below.

 

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •