首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

为什么小弟我写的ListViewItem lvi = new ListViewItem(); 必须要有参数才行

2013-09-05 
为什么我写的ListViewItem lvi new ListViewItem() 必须要有参数才行?ListViewItem lvi new ListView

为什么我写的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的代码。。

热点排行