程序源代码如下:
using System;
using System.Net;
using System.Net.Sockets;
using System.Collections.Generic;
using System.Text;namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
IPHostEntry iphostentry = Dns.Resolve("www.google.com");
IPAddress ip = iphostentry.AddressList[0];
Console.WriteLine(ip);
}
}
}警告 1 “System.Net.Dns.Resolve(string)”已过时:“Resolve is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202”怎样解决,最新的dns.resolve()参数是什么啊??
using System;
using System.Net;
using System.Net.Sockets;
using System.Collections.Generic;
using System.Text;namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
IPHostEntry iphostentry = Dns.Resolve("www.google.com");
IPAddress ip = iphostentry.AddressList[0];
Console.WriteLine(ip);
}
}
}警告 1 “System.Net.Dns.Resolve(string)”已过时:“Resolve is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202”怎样解决,最新的dns.resolve()参数是什么啊??
解决方案 »
- 3G拨号和ADSL拨号是不是一样的?
- winfrom程序在VS中调试无错误,单独运行.exe文件时却总是出错,求高手解答!
- C#读取Access的ole对象
- VC#写的.net 程序 与asp.net 客户端用什么方式实时通讯较好?
- 紧急求救!请问如何判断SQL数据库中一张表和ACCESS中的一张表的结构是否一样?
- delphi用了好几年了,进来c#,发现人气还可以,想学学c#
- 求助!!Iocomp控件,程序发布之后总是会弹出一个评估的对话框如何解决!!
- 我做的网站要有这个特点,怎么搞?
- 【c#源码】安卓客户端通过TCP通信与Windows服务器进行文件传输
- winfrom FlowLayoutPanel 触屏的滑屏滚动
- C#的一個問題,高手來啊
- 求...Enumerable.Join方法讲解
IPHostEntry iphostentry = Dns.GetHostEntry("www.google.com");