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

  • <legend id='S5Cj2'><style id='S5Cj2'><dir id='S5Cj2'><q id='S5Cj2'></q></dir></style></legend>

        <bdo id='S5Cj2'></bdo><ul id='S5Cj2'></ul>

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

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

        您如何獲得 ToDictionary() 失敗的重復鍵?

        How do you get the duplicate key that ToDictionary() has failed on?(您如何獲得 ToDictionary() 失敗的重復鍵?)

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

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

                1. 本文介紹了您如何獲得 ToDictionary() 失敗的重復鍵?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在創建一個 Dictionary 對象,使用 IEnumerableToDictionary() 擴展方法:

                  I'm creating a Dictionary object, using IEnumerable's ToDictionary() extension method:

                  var dictionary = new Dictionary<string, MyType>
                      (myCollection.ToDictionary<MyType, string>(k => k.Key));
                  

                  當它執行時,它會拋出以下ArgumentException:

                  When it executes, it throws the following ArgumentException:

                  已添加具有相同密鑰的項目.

                  An item with the same key has already been added.

                  如何讓它告訴我重復鍵是什么?

                  How do I get it to tell me what the duplicate key is?

                  推薦答案

                  獲取重復鍵:

                  var duplicateKeys =
                    myCollection
                   .GroupBy(k => k.Key)
                   .Where(g => g.Count() > 1)
                   .Select(g => g.Key);
                  

                  這篇關于您如何獲得 ToDictionary() 失敗的重復鍵?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)
                    <tbody id='sDpsQ'></tbody>

                    <tfoot id='sDpsQ'></tfoot>

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

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

                        • <bdo id='sDpsQ'></bdo><ul id='sDpsQ'></ul>
                          1. <legend id='sDpsQ'><style id='sDpsQ'><dir id='sDpsQ'><q id='sDpsQ'></q></dir></style></legend>
                          2. 主站蜘蛛池模板: 9久久精品 | 欧美二三区 | 精品一二三区在线观看 | 成人做爰www免费看视频网站 | 毛片综合| 亚洲一区中文 | 精品1区 | 亚洲精品一区二区三区蜜桃久 | 日韩 国产 在线 | 欧美午夜一区 | 国产精品美女久久久久aⅴ国产馆 | 亚洲精品欧美一区二区三区 | 日韩精品| 中文字幕视频在线观看 | 国产成人精品一区二区三区 | 国产高清不卡 | 国产精品成人一区二区 | 久久99精品久久久久久国产越南 | www.色.com| 欧美久久久网站 | 欧美日韩不卡 | 密室大逃脱第六季大神版在线观看 | 精品久久国产 | 一级aaaaaa毛片免费同男同女 | 操操操日日日 | 欧美日韩精品亚洲 | 婷婷不卡 | 久久久一区二区三区 | 中文字幕亚洲一区二区三区 | 日韩影院在线观看 | 色播99| 国产精品一区二区日韩 | 一区二区三区欧美 | 精品国产乱码久久久久久丨区2区 | 精品国产乱码久久久久久闺蜜 | 欧美专区在线观看 | 九九热在线免费视频 | 国产精品一区二区三区久久久 | 国产精品一区在线观看 | 91精品国产高清久久久久久久久 | 狠狠色狠狠色综合日日92 |