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

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/>";
主站蜘蛛池模板: 洱源县| 义乌市| 兴安盟| 龙江县| 法库县| 福泉市| 西峡县| 平山县| 都江堰市| 溧阳市| 米易县| 东光县| 和田市| 宿松县| 通许县| 皮山县| 湘西| 鄂尔多斯市| 焉耆| 新丰县| 西乌| 阜城县| 侯马市| 油尖旺区| 福建省| 祥云县| 阳朔县| 来凤县| 永州市| 延津县| 辽源市| 灌云县| 拜城县| 德江县| 玉环县| 昌黎县| 麟游县| 加查县| 慈溪市| 时尚| 阿合奇县|