删除最后一个参数:
public vkMessages(string kto, DateTime date_time,
string text, bool read_state,string in_or_out)
: this(kto, date_time, text, read_state)
{
InOrOut = in_or_out;
}
也就是说,您的逻辑是倾斜的,应该是相反的(即这个构造函数应该完成所有工作,而另一个构造函数应该调用这个:
public vkMessages(string kto, DateTime date_time, string text, bool read_state)
: this(kto, date_time, text, read_state, false) { }
public vkMessages(string kto, DateTime date_time,
string text, bool read_state,string in_or_out)
{
InOrOut = in_or_out;
Kto = kto;
Date_Time = date_time;
TexT = text;
Read_State = read_state;
}
最后,您应该修复标识符以符合 .NET 准则。特别是,类应遵循以大写字母开头的 PascalCase 约定。