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

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/>";
主站蜘蛛池模板: 右玉县| 林州市| 罗江县| 泸水县| 无极县| 北碚区| 阳西县| 分宜县| 广德县| 玛纳斯县| 惠水县| 成都市| 彭泽县| 尚义县| 远安县| 余干县| 班玛县| 沈丘县| 易门县| 津市市| 达尔| 虹口区| 涟源市| 桑植县| 皮山县| 长泰县| 万年县| 抚松县| 隆回县| 大荔县| 嘉峪关市| 正镶白旗| 张家港市| 耒阳市| 攀枝花市| 天气| 江北区| 鄄城县| 神农架林区| 安乡县| 东城区|