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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # &lt;&lt; 運算符(C# 參考) 左移運算符 (**&lt;&lt;**) 將第一個操作數向左移動第二個操作數指定的位數。第二個操作數的類型必須是一個 [int](https://msdn.microsoft.com/zh-CN/library/5kzh1b5w.aspx) 或具有向 **int** 的預定義隱式數值轉換的類型。 ## 備注 如果第一個操作數是 [int](https://msdn.microsoft.com/zh-CN/library/5kzh1b5w.aspx) 或 [uint](https://msdn.microsoft.com/zh-CN/library/x0sksh43.aspx)(32 位數),則移位數由第二個操作數的低 5 位給出。也就是實際的 shift 計數為 0 到 31 位。 如果第一個操作數是 [long](https://msdn.microsoft.com/zh-CN/library/ctetwysk.aspx) 或 [ulong](https://msdn.microsoft.com/zh-CN/library/t98873t4.aspx)(64 位數),則移位數由第二個操作數的低 6 位給出。也就是實際的 shift 計數為 0 到 63 位。 不在移位后第一個操作數類型范圍內的任意高序位均不會使用,低序空位用零填充。移位操作從不導致溢出。 用戶定義的類型可重載 **&lt;&lt;** 運算符(請參見[操作數](https://msdn.microsoft.com/zh-CN/library/s53ehcz3.aspx));第一個操作數的類型必須為用戶定義的類型,第二個操作數的類型必須為 **int**。重載二元運算符時,也會隱式重載相應的賦值運算符(如果有)。 ``` class MainClass11 { static void Main() { int i = 1; long lg = 1; // Shift i one bit to the left. The result is 2. Console.WriteLine("0x{0:x}", i << 1); // In binary, 33 is 100001\. Because the value of the five low-order // bits is 1, the result of the shift is again 2\. Console.WriteLine("0x{0:x}", i << 33); // Because the type of lg is long, the shift is the value of the six // low-order bits. In this example, the shift is 33, and the value of // lg is shifted 33 bits to the left. // In binary: 10 0000 0000 0000 0000 0000 0000 0000 0000 // In hexadecimal: 2 0 0 0 0 0 0 0 0 Console.WriteLine("0x{0:x}", lg << 33); } } /* Output: 0x2 0x2 0x200000000 */ ``` ## 注釋 請注意,i&lt;&lt;1 和 i&lt;&lt;33 給出的結果相同,因為 1 和 33 的低序 5 位相同。 ## 請參閱 [C# 參考](https://msdn.microsoft.com/zh-CN/library/618ayhy6.aspx) [C# 編程指南](https://msdn.microsoft.com/zh-CN/library/67ef8sbd.aspx) [C# 運算符](https://msdn.microsoft.com/zh-CN/library/6a71f45d.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>

                              哎呀哎呀视频在线观看