Environment is a class defined by System Namespace.
MachineName is its property.
It reads the NetBIOS name of local computer..
SystemInformation is a class defined by System.Windows.Forms Namespace
ComputerName is its property,
Same as Environment.MachineName
Dns is a class defined by System.Net namespace:
GetHostName is its method.
It gets host name of computer which refers to a domain name that has one or more associated IP adresses.
Asked In: Many Interviews |