using
System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
namespace Pxkt_Service
{
public partial class DomainToIp : Form
{
public DomainToIp()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string strDomain = textBox1.Text.ToString();
IPHostEntry hostEntry = Dns.GetHostEntry(strDomain);
IPEndPoint ipEndPoint = new IPEndPoint(hostEntry.AddressList[0], 0);
string ipAddress = ipEndPoint.Address.ToString();
textBox1.Text = ipAddress;
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
namespace Pxkt_Service
{
public partial class DomainToIp : Form
{
public DomainToIp()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string strDomain = textBox1.Text.ToString();
IPHostEntry hostEntry = Dns.GetHostEntry(strDomain);
IPEndPoint ipEndPoint = new IPEndPoint(hostEntry.AddressList[0], 0);
string ipAddress = ipEndPoint.Address.ToString();
textBox1.Text = ipAddress;
}
}
}