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

  1. <tfoot id='VlRXx'></tfoot>

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

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

    2. 如何按順序?qū)㈨椖坎迦肓斜?

      How to insert item into list in order?(如何按順序?qū)㈨椖坎迦肓斜?)
    3. <small id='EHs3F'></small><noframes id='EHs3F'>

      <tfoot id='EHs3F'></tfoot>
        <tbody id='EHs3F'></tbody>

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

              • <bdo id='EHs3F'></bdo><ul id='EHs3F'></ul>
                本文介紹了如何按順序?qū)㈨椖坎迦肓斜?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我有一個 DateTimeOffset 對象列表,我想將新對象按順序插入到列表中.

                I have a List of DateTimeOffset objects, and I want to insert new ones into the list in order.

                List<DateTimeOffset> TimeList = ...
                // determine the order before insert or add the new item
                

                抱歉,需要更新我的問題.

                Sorry, need to update my question.

                List<customizedClass> ItemList = ...
                //customizedClass contains DateTimeOffset object and other strings, int, etc.
                
                ItemList.Sort();    // this won't work until set data comparison with DateTimeOffset
                ItemList.OrderBy(); // this won't work until set data comparison with DateTimeOffset
                

                另外,如何將DateTimeOffset作為.OrderBy()的參數(shù)?

                Also, how to put DateTimeOffset as the parameter of .OrderBy()?

                我也試過了:

                ItemList = from s in ItemList
                           orderby s.PublishDate descending    // .PublishDate is type DateTime
                           select s;
                

                但是,它會返回此錯誤消息,

                However, it returns this error message,

                無法將類型System.Linq.IOrderedEnumerable"隱式轉(zhuǎn)換為System.Collections.Gerneric.List".存在顯式轉(zhuǎn)換(您是否缺少演員表?)

                Cannot implicitly convert type 'System.Linq.IOrderedEnumerable' to 'System.Collections.Gerneric.List'. An explicit conversion exist (are you missing a cast?)

                推薦答案

                修改你的LINQ,在末尾添加ToList():

                Modify your LINQ, add ToList() at the end:

                ItemList = (from s in ItemList
                            orderby s.PublishDate descending   
                            select s).ToList();
                

                或者將排序后的列表分配給另一個變量

                Alternatively assign the sorted list to another variable

                var sortedList = from s in ....
                

                這篇關于如何按順序?qū)㈨椖坎迦肓斜?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)
                <i id='Jh0vn'><tr id='Jh0vn'><dt id='Jh0vn'><q id='Jh0vn'><span id='Jh0vn'><b id='Jh0vn'><form id='Jh0vn'><ins id='Jh0vn'></ins><ul id='Jh0vn'></ul><sub id='Jh0vn'></sub></form><legend id='Jh0vn'></legend><bdo id='Jh0vn'><pre id='Jh0vn'><center id='Jh0vn'></center></pre></bdo></b><th id='Jh0vn'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Jh0vn'><tfoot id='Jh0vn'></tfoot><dl id='Jh0vn'><fieldset id='Jh0vn'></fieldset></dl></div>
                  <bdo id='Jh0vn'></bdo><ul id='Jh0vn'></ul>
                    <tbody id='Jh0vn'></tbody>
                  <legend id='Jh0vn'><style id='Jh0vn'><dir id='Jh0vn'><q id='Jh0vn'></q></dir></style></legend>

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

                    1. <tfoot id='Jh0vn'></tfoot>

                          主站蜘蛛池模板: 不卡av在线| 日韩1区2区 | 亚洲一区二区三区四区五区午夜 | 国产精品96久久久久久 | 超碰网址 | 日本午夜免费福利视频 | 久久国产一区二区 | 亚洲精品国产第一综合99久久 | 中文字幕av网 | 一区二区三区四区五区在线视频 | 做a视频在线观看 | 午夜影院在线观看 | 中文字幕欧美在线观看 | 日韩欧美在线免费观看视频 | a级在线免费视频 | 亚洲国产精品一区二区久久 | 一区二区免费高清视频 | 国产一区二区三区视频 | 色欧美片视频在线观看 | 成年人免费看的视频 | 久久久区 | 在线天堂免费中文字幕视频 | 亚洲视频免费一区 | 国产视频2021 | 国产精品3区| 日韩一区不卡 | 国产精品久久久久久久久污网站 | 久久久九九九九 | 看av网址 | 中文字幕高清 | 夜夜草视频 | 国产乱码一二三区精品 | a黄在线观看 | 日本免费一区二区三区视频 | 日韩av在线一区 | 国产美女精品 | 激情亚洲 | 五月香婷婷 | 精国产品一区二区三区四季综 | 1级黄色大片 | 91精品久久久久久久久久入口 |