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

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/>";
主站蜘蛛池模板: 利津县| 潞城市| 江都市| 青龙| 东丰县| 高青县| 和硕县| 井研县| 慈溪市| 家居| 禹城市| 巴塘县| 兴城市| 宣汉县| 五常市| 拉萨市| 洛南县| 密山市| 永胜县| 徐汇区| 清水县| 崇礼县| 池州市| 恩平市| 曲水县| 屏山县| 宝坻区| 砀山县| 麻城市| 中江县| 中山市| 乐业县| 延津县| 阳谷县| 永安市| 荆门市| 武城县| 高平市| 正宁县| 南部县| 扎兰屯市|