using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
namespace GetIp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
string name= Dns.GetHostName();
// IPHostEntry Iphost= Dns.GetHostByName(name);
// IPAddress Ip = Iphost.AddressList[0];
// textBox1.Text = Ip.ToString();
IPHostEntry en= Dns.GetHostEntry(name); //获得主机名称;
for(int i = 0; i
}



