Mark,现在在公司,没有安装VS,回去再看看!

解决方案 »

  1.   

    IPAddress ip =IPAddress.Parse("vc815vc.noip.cn"); <---错误提示指定了无效的 IP 地址
      

  2.   

    不知道这个是不是你要实现的,得到IP!
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Net;
    using System.Windows.Forms;namespace GetIPFormDoman
    {
        public partial class MainForm : Form
        {
            IPEndPoint ipEp;
            public MainForm()
            {
                InitializeComponent();
            }        private void bt_Ok_Click(object sender, EventArgs e)
            {
                IPAddress[] ipA;
                ipA = Dns.GetHostAddresses(tb_Doman.Text);
                if (ipA.Length > 0)
                {
                    lb_Result.Text = ipA[0].ToString();
                    ipEp = new IPEndPoint(ipA[0], 80);
                }
                else
                    lb_Result.Text = "没有结果!";
            }
        }
    }
      

  3.   

    ipA = Dns.GetHostAddresses(tb_Doman.Text);
    tb_Doman.Text<--这个是个动态域名ipA = Dns.GetHostAddresses(tb_Doman.Text);<--提示错误:无法找到主机
    是不是我动态域名有问题?