我正在尝试创建一个 TcpClient 并遇到构造函数问题......
public class TcpClient : IDisposable
{
static void Connect(String server, String message)
{
try
{
// Create a TcpClient.
// Note, for this client to work you need to have a TcpServer
// connected to the same address as specified by the server, port
// combination.
Int32 port = 9000;
TcpClient client = new TcpClient(server, port);
我得到错误:
错误 1 'TcpClient' 不包含采用 2 个参数的构造函数
我的问题:
为什么会出现此问题以及如何解决?