Private void scantarget () {// Constructs 31-8bit bits of the IP address, that is, the front section of the fixed IP address // numericupdown1 is the defined system.windows.Forms.NumericUpdown control string stripaddress = "192.168.1."; / / Start Scanning Address INT NSTRAT = 0; // Terminate Scan Address INT NEND = 255; // Scanning Operation for (INT I = NSTRAT; I <= NEND; I ) {String StrscanipAdd = StripAddress i.toString (); // Convert to IP Address MyScanip = ipaddress.parse (STRSCANIPADD); try {// You can join your own, enhanced function // DNS.GETHOSTBYADDRESS method: DNS host information is obtained according to IP // Address. IPHostEntry myScanHost = Dns.GetHostByAddress (myScanIP); // get the host name string strHostName = myScanHost.HostName.ToString (); richTextBox1.AppendText (strScanIPAdd "->" strHostName "/ r");} catch (Exception error) {MessageBox.show (Error.Message);}} // for} // privat