<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 可索引集合 ``` List<int> numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; List salmons = ["chinook", "coho", "pink", "sockeye"]; salmons.Remove("coho"); salmons.Add("coho"); ``` 由[List](https://learn.microsoft.com/zh-cn/dotnet/api/system.collections.generic.list-1)使用的`Galaxy`類在代碼中定義 ``` private static void IterateThroughList() { var theGalaxies = new List<Galaxy> { new (){ Name="Tadpole", MegaLightYears=400}, new (){ Name="Pinwheel", MegaLightYears=25}, new (){ Name="Milky Way", MegaLightYears=0}, new (){ Name="Andromeda", MegaLightYears=3} }; foreach (Galaxy theGalaxy in theGalaxies) { Console.WriteLine(theGalaxy.Name + " " + theGalaxy.MegaLightYears); } // Output: // Tadpole 400 // Pinwheel 25 // Milky Way 0 // Andromeda 3 } public class Galaxy { public string Name { get; set; } public int MegaLightYears { get; set; } } ``` ## 鍵/值對集合 [Dictionary](https://learn.microsoft.com/zh-cn/dotnet/api/system.collections.generic.dictionary-2)類 字典集合 創建`Dictionary`集合并通過使用`foreach`語句循環訪問字典 ``` private static void IterateThruDictionary() { Dictionary<string, Element> elements = BuildDictionary(); foreach (KeyValuePair<string, Element> kvp in elements) { Element theElement = kvp.Value; Console.WriteLine("key: " + kvp.Key); Console.WriteLine("values: " + theElement.Symbol + " " + theElement.Name + " " + theElement.AtomicNumber); } } public class Element { public required string Symbol { get; init; } public required string Name { get; init; } public required int AtomicNumber { get; init; } } private static Dictionary<string, Element> BuildDictionary() => new () { {"K", new (){ Symbol="K", Name="Potassium", AtomicNumber=19}}, {"Ca", new (){ Symbol="Ca", Name="Calcium", AtomicNumber=20}}, {"Sc", new (){ Symbol="Sc", Name="Scandium", AtomicNumber=21}}, {"Ti", new (){ Symbol="Ti", Name="Titanium", AtomicNumber=22}} }; ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看