高手们,俺想请问。。。。。。
using System;
using System.Net;
using System.Net.Sockets;
class mainprocess
{
static void Main()
{
try
{
IPEndPoint host=new IPEndPoint(IPAddress.Parse("172.16.1.30"),80);
Socket s=new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
s.Bind(host);
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
}
}
用csc编译通过,但在执行时出现错误信息;参考的对象种类不支持尝试的操作。
请问错出在哪里?