打开窗体设计视图出现如下错误:
查看后台代码:
ColumnHeader colHead;
colHead = new ColumnHeader();
colHead.Text = "Ch";
colHead.Width = ;
this.ChList.Columns.Add(colHead); colHead = new ColumnHeader();
colHead.Text = "ChType";
colHead.Width = ;
this.ChList.Columns.Add(colHead); colHead = new ColumnHeader();
colHead.Text = "Status";
colHead.Width = ;
this.ChList.Columns.Add(colHead); colHead = new ColumnHeader();
colHead.Text = "CallerId";
colHead.Width = ;
this.ChList.Columns.Add(colHead); colHead = new ColumnHeader();
colHead.Text = "CalleeId";
colHead.Width = ;
this.ChList.Columns.Add(colHead);
//
colHead = new ColumnHeader();
colHead.Text = "DTMFBuffer";
colHead.Width = ;
this.ChList.Columns.Add(colHead);
发现设计器不能识别相同变量的声明不同的实例。
将每个ColumnHeader 都声明一次 解决问题