<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之旅 廣告
                # Compiler Error CS1674 “T”:using 語句中使用的類型必須可以隱式轉換為“System.IDisposable” [using 語句](https://msdn.microsoft.com/zh-cn/library/yh598w02.aspx) 旨在用于確保在 **using** 塊的最后處置對象,因此只有可處置的類型才能在這類語句中使用。例如,值類型不是可處置的,并且沒有約束為類的類型參數不能假定為可處置。 下面的示例生成 CS1674。 ``` // CS1674.cs class C { public static void Main() { int a = 0; a++; using (a) {} // CS1674 } } ``` 下面的示例生成 CS1674。 ``` // CS1674_b.cs using System; class C { public void Test() { using (C c = new C()) {} // CS1674 } } // OK class D : IDisposable { void IDisposable.Dispose() {} public void Dispose() {} public static void Main() { using (D d = new D()) {} } } ``` 下面的示例說明了需要使用一個類類型約束來確保未知的類型參數是可釋放的。下面的示例生成 CS1674。 ``` // CS1674_c.cs // compile with: /target:library using System; public class C<T> // Add a class type constraint that specifies a disposable class. // Uncomment the following line to resolve. // public class C<T> where T : IDisposable { public void F(T t) { using (t) {} // CS1674 } } ```
                  <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>

                              哎呀哎呀视频在线观看