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