<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 作為對象的數組(C# 編程指南) 在 C# 中,數組實際上是對象,而不只是像 C 和 C++ 中那樣的可尋址連續內存區域。 [Array](https://msdn.microsoft.com/zh-cn/library/system.array.aspx) 是所有數組類型的抽象基類型。 可以使用 [Array](https://msdn.microsoft.com/zh-cn/library/system.array.aspx) 具有的屬性以及其他類成員。 這種用法的一個示例是使用 [Length](https://msdn.microsoft.com/zh-cn/library/system.array.length.aspx) 屬性來獲取數組的長度。 下面的代碼將 numbers 數組的長度(為 5)賦給名為 lengthOfNumbers 的變量: ``` int[] numbers = { 1, 2, 3, 4, 5 }; int lengthOfNumbers = numbers.Length; ``` [Array](https://msdn.microsoft.com/zh-cn/library/system.array.aspx) 類提供了許多其他有用的方法和屬性,用于排序、搜索和復制數組。 ## 示例 <a id="exampleToggle"></a> 此示例使用 [Rank](https://msdn.microsoft.com/zh-cn/library/system.array.rank.aspx) 屬性來顯示數組的維數。 ``` class TestArraysClass { static void Main() { // Declare and initialize an array: int[,] theArray = new int[5, 10]; System.Console.WriteLine("The array has {0} dimensions.", theArray.Rank); } } // Output: The array has 2 dimensions. ``` ## 請參見 <a id="seeAlsoToggle"></a> #### 參考 [數組(C# 編程指南)](https://msdn.microsoft.com/zh-cn/library/9b9dty7d.aspx) [一維數組(C# 編程指南)](https://msdn.microsoft.com/zh-cn/library/0a7fscd0.aspx) [多維數組(C# 編程指南)](https://msdn.microsoft.com/zh-cn/library/2yd9wwz4.aspx) [交錯數組(C# 編程指南)](https://msdn.microsoft.com/zh-cn/library/2s05feca.aspx) #### 概念 [C# 編程指南](https://msdn.microsoft.com/zh-cn/library/67ef8sbd.aspx)
                  <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>

                              哎呀哎呀视频在线观看