这种写法是什么意思?
public BaseControler(IPAddress serverAddress, int port)
: this(serverAddress, port, Constant.MaxTimes)
public BaseControler(IPAddress serverAddress, int port, int maxTimes): base()
一个类,继承的另外一个类,这是两个构造函数
冒号后面接一个方法是干吗用的?
------解决方案--------------------先执行父类的 构造函数
------解决方案--------------------public BaseControler(IPAddress serverAddress, int port)
: this(serverAddress, port, Constant.MaxTimes)
=================================================================
类BaseControler的带两个参数的构造函数调用类BaseControler的带三个参数的构造函数,最后一个参数给的相当于默认值
public BaseControler(IPAddress serverAddress, int port, int maxTimes): base()
============================================================================
调用基类的默认构造函数