日期:2014-05-17  浏览次数:20774 次

为什么我写的ListViewItem lvi = new ListViewItem(); 必须要有参数才行?
ListViewItem lvi = new ListViewItem();
错误 “System.Web.UI.WebControls.ListViewItem”不包含采用“0”个参数的构造函数

但是我在网上随便找的例子,都是这样写的啊,没见new ListViewItem(); 还带了参数的

而且msdn上

ListView listView1 = new ListView();
listView1.Bounds = new Rectangle(new Point(10,10), new Size(300,200));

// Set the view to show details.
listView1.View = View.Details;
// Allow the user to edit item text.
listView1.LabelEdit = true;
// Allow the user to rearrange columns.
listView1.AllowColumnReorder = true;
// Display check boxes.
listView1.CheckBoxes = true;
// Select the item and subitems when selection is made.
listView1.FullRowSelect = true;
// Display grid lines.
listView1.GridLines = true;
// Sort the items in the list in ascending order.
listView1.Sorting = SortOrder.Ascending;


而我放在本地写算么listView1.AllowColumnReorder这些属性压根就没有啊?

------解决方案--------------------
你找的是WINFORM的代码。。