久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <small id='husAT'></small><noframes id='husAT'>

    <legend id='husAT'><style id='husAT'><dir id='husAT'><q id='husAT'></q></dir></style></legend>

      <bdo id='husAT'></bdo><ul id='husAT'></ul>
  2. <tfoot id='husAT'></tfoot>

  3. <i id='husAT'><tr id='husAT'><dt id='husAT'><q id='husAT'><span id='husAT'><b id='husAT'><form id='husAT'><ins id='husAT'></ins><ul id='husAT'></ul><sub id='husAT'></sub></form><legend id='husAT'></legend><bdo id='husAT'><pre id='husAT'><center id='husAT'></center></pre></bdo></b><th id='husAT'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='husAT'><tfoot id='husAT'></tfoot><dl id='husAT'><fieldset id='husAT'></fieldset></dl></div>

    1. 是否可以從第一個使用 foreach 的元素以外的元素

      Is it possible to do start iterating from an element other than the first using foreach?(是否可以從第一個使用 foreach 的元素以外的元素開始迭代?)
        <i id='CtHgi'><tr id='CtHgi'><dt id='CtHgi'><q id='CtHgi'><span id='CtHgi'><b id='CtHgi'><form id='CtHgi'><ins id='CtHgi'></ins><ul id='CtHgi'></ul><sub id='CtHgi'></sub></form><legend id='CtHgi'></legend><bdo id='CtHgi'><pre id='CtHgi'><center id='CtHgi'></center></pre></bdo></b><th id='CtHgi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CtHgi'><tfoot id='CtHgi'></tfoot><dl id='CtHgi'><fieldset id='CtHgi'></fieldset></dl></div>
      • <tfoot id='CtHgi'></tfoot><legend id='CtHgi'><style id='CtHgi'><dir id='CtHgi'><q id='CtHgi'></q></dir></style></legend>

            <small id='CtHgi'></small><noframes id='CtHgi'>

            • <bdo id='CtHgi'></bdo><ul id='CtHgi'></ul>

                  <tbody id='CtHgi'></tbody>
              1. 本文介紹了是否可以從第一個使用 foreach 的元素以外的元素開始迭代?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在考慮為我的自定義集合(一棵樹)實現 IEnumerable,以便我可以使用 foreach 遍歷我的樹.但是據我所知,foreach 總是從集合的第一個元素開始.我想選擇從哪個元素 foreach 開始.是否可以以某種方式更改 foreach 開始的元素?

                I'm thinking about implementing IEnumerable for my custom collection (a tree) so I can use foreach to traverse my tree. However as far as I know foreach always starts from the first element of the collection. I would like to choose from which element foreach starts. Is it possible to somehow change the element from which foreach starts?

                推薦答案

                是的.執行以下操作:

                Collection<string> myCollection = new Collection<string>;
                
                foreach (string curString in myCollection.Skip(3))
                    //Dostuff
                

                Skip 是一個 IEnumerable 函數,它可以從當前索引開始跳過您指定的任意數量.另一方面,如果你想使用 only 前三個你會使用 .Take:

                Skip is an IEnumerable function that skips however many you specify starting at the current index. On the other hand, if you wanted to use only the first three you would use .Take:

                foreach (string curString in myCollection.Take(3))
                

                這些甚至可以搭配在一起,所以如果你只想要 4-6 件,你可以這樣做:

                These can even be paired together, so if you only wanted the 4-6 items you could do:

                foreach (string curString in myCollection.Skip(3).Take(3))
                

                這篇關于是否可以從第一個使用 foreach 的元素以外的元素開始迭代?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                Parse malformed XML(解析格式錯誤的 XML)

                  <i id='caCTJ'><tr id='caCTJ'><dt id='caCTJ'><q id='caCTJ'><span id='caCTJ'><b id='caCTJ'><form id='caCTJ'><ins id='caCTJ'></ins><ul id='caCTJ'></ul><sub id='caCTJ'></sub></form><legend id='caCTJ'></legend><bdo id='caCTJ'><pre id='caCTJ'><center id='caCTJ'></center></pre></bdo></b><th id='caCTJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='caCTJ'><tfoot id='caCTJ'></tfoot><dl id='caCTJ'><fieldset id='caCTJ'></fieldset></dl></div>

                  <small id='caCTJ'></small><noframes id='caCTJ'>

                    <legend id='caCTJ'><style id='caCTJ'><dir id='caCTJ'><q id='caCTJ'></q></dir></style></legend>
                      <bdo id='caCTJ'></bdo><ul id='caCTJ'></ul>
                        <tfoot id='caCTJ'></tfoot>

                          <tbody id='caCTJ'></tbody>

                        1. 主站蜘蛛池模板: 日韩欧美在线视频 | 91精品国产综合久久福利软件 | 精品三区 | 特级a欧美做爰片毛片 | 亚洲精品一二三 | 午夜小视频在线播放 | 亚洲成人黄色 | 日韩一区中文字幕 | 一区二区在线不卡 | 日韩精品一区二区三区视频播放 | 成人午夜免费福利视频 | 51ⅴ精品国产91久久久久久 | 国产成人网| 91亚洲视频在线 | 久久精品中文字幕 | 久久精品国产免费一区二区三区 | 欧美精品一区二区三区在线播放 | 欧美精品久久久 | 欧美视频三区 | 久久亚洲国产精品 | 日韩精品在线观看网站 | 欧美精品一区二区在线观看 | 日韩欧美综合 | 天天射夜夜操 | 亚洲成人日韩 | 中文字幕在线观看一区 | 美女在线观看av | 午夜电影在线播放 | 亚洲欧美日本在线 | 99视频网站 | 国产免费va| 日本免费一区二区三区视频 | 国产目拍亚洲精品99久久精品 | 超碰3 | 91日b| 国产免费一区二区三区 | 99视频在线播放 | 成人精品一区亚洲午夜久久久 | 插插插干干干 | 国产精品一区视频 | 在线观看av网站永久 |