获得ListView选中的记录数(没意义的代码)
2016-01-28 15:18:05 访问(1640) 赞(0) 踩(0)
/// <summary>
/// 获得ListView选中的记录数(没意义的代码)
/// </summary>
/// <param name="lv"></param>
/// <param name="bFlag"></param>
/// <returns></returns>
public int ListViewCountSelected(ListView lv, bool bFlag)
{
int theResult = 0;
foreach (ListViewItem lvItem in lv.Items)
{
if (lvItem == null)
continue;
if (lvItem.Selected == bFlag)
++theResult;
}
return theResult;
}
标签:
获得ListView选中的记录数(没意义的代码) 


上一条:
下一条:
相关评论
发表评论