官术网_书友最值得收藏!

Converting the values back to a list

After valuesMoreThanTen, you would like to be able to use a foreach loop. To do this, you've got to convert this back to a list because, remember, IEnumerable is not a list. That's why the foreach loop doesn't show if you typed it right after the . (dot) after valuesMoreThanTen. You convert it to a list, and then foreach shows. Now you can again display the values; so in foreach x, you'll take the x value and display it in a label as shown in the preceding line of code. This line now will display each x value from the valuesMoreThanTen list.

Now, you can tell just by examining it that 12, 25, and 54 should print. That's the first thing. Now, let's also display a horizontal line below this line. So, enter the following next:

sampLabel.Text += "<br><hr/>";
主站蜘蛛池模板: 南昌市| 新建县| 徐汇区| 千阳县| 崇信县| 红桥区| 芷江| 乡宁县| 海南省| 库伦旗| 紫云| 繁峙县| 安泽县| 得荣县| 汝阳县| 丰县| 大埔区| 天峨县| 兴和县| 西吉县| 冕宁县| 桃源县| 广南县| 中牟县| 思茅市| 舟山市| 铜鼓县| 九江市| 公安县| 晋宁县| 二手房| 谷城县| 穆棱市| 二手房| 铜陵市| 清水河县| 海淀区| 吉首市| 康马县| 南安市| 江都市|