using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//网络通讯的技术 的命名
using System.Net;
using System.Net.Sockets;
namespace 网络
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string hostname = Dns.GetHostName();
//IPAddress ip=IPAddress.Parse("192.168.39.112");
//iphostentry类
IPHostEntry iph = Dns.GetHostEntry(hostname);//给主机名或IP
//上 返回主机的ip及主机信息
IPAddress[] ips= iph.AddressList;
foreach
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//网络通讯的技术 的命名
using System.Net;
using System.Net.Sockets;
namespace 网络
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string hostname = Dns.GetHostName();
//IPAddress ip=IPAddress.Parse("192.168.39.112");
//iphostentry类
IPHostEntry iph = Dns.GetHostEntry(hostname);//给主机名或IP
//上 返回主机的ip及主机信息
IPAddress[] ips= iph.AddressList;
foreach