这段代码什么意思?求高人解释:
List<BoundaryCell> list = new List<BoundaryCell>(4);
list.Add(cellUp);
list.Add(cellDown);
list.Add(cellLeft);
list.Add(cellRight);
HashSet<BoundaryCell> boundaryCells = new HashSet<BoundaryCell>(list);
这是用C#写的。
BoundaryCell是边界像素,cellUp、cellDown、cellLeft、cellRight分别是上下左右相邻像素。不过这不重要……求解释最后一句。我感觉最后一句HashSet的值的类型应该是List而不是BoundaryCell。求高人指点。
List<BoundaryCell> list = new List<BoundaryCell>(4);
list.Add(cellUp);
list.Add(cellDown);
list.Add(cellLeft);
list.Add(cellRight);
HashSet<BoundaryCell> boundaryCells = new HashSet<BoundaryCell>(list);
这是用C#写的。
BoundaryCell是边界像素,cellUp、cellDown、cellLeft、cellRight分别是上下左右相邻像素。不过这不重要……求解释最后一句。我感觉最后一句HashSet的值的类型应该是List而不是BoundaryCell。求高人指点。
解决方案 »
- 【初学者求教】SQL语句
- 把年终奖都投资了。。。大家来看看100分
- setWindowPos的问题
- 郁闷呀~~为什么HttpWebRequest下载一个图形验证码会无效
- 问个小问题啊
- 大哥大姐 们 小妹妹 有是请教 c# 怎么用web控件呀 !!!!1
- aspx bs开发各客户端之间如何实现点对点通讯?
- 我以前用java生成pdf文件,然后打印,请问这样的功能C#怎么实现?
- 将word以二进制文件保存到access数据库时,较大文件用时较长的问题应该怎样解决?怎样做可以快一点儿?请高手帮忙!多谢!!
- 在.NET下如何开发USB通信程序?
- 关于datagridview单元格空值问题
- VS 打包 选择框
HashSet<string> companyTeams = new HashSet<string>() { "Ferrari", "McLaren", "Toyota", "BMW", "Renault", "Honda" };
HashSet<string> companyTeams1 = new HashSet<string>(list);
因为 list 中是BoundaryCell,所以才有这么一句 HashSet<BoundaryCell>(list),转换list为HashSet<BoundaryCell>