using System; using System.Collections.Generic; using System.Text; using System.Net; namespacereadonly ...{ class workstation ...{ publicconststring HostName ="lenovo-e590f938"; publicreadonlystring IPAddressString; public workstation() ...{ IPAddress ipaddress = Dns.GetHostByName("lenovo-e590f938").AddressList[0]; IPAddressString = ipaddress.ToString(); } } class Program ...{ staticvoid Main(string[] args) ...{ workstation workstation =new workstation(); Console.WriteLine("The IP Address for '{0}' is {1}",workstation.HostName,workstation.IPAddressString); } } }