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

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

        <legend id='VQAhG'><style id='VQAhG'><dir id='VQAhG'><q id='VQAhG'></q></dir></style></legend>

      1. .NET 命名空间和 using 语句

        时间:2023-09-16
              <bdo id='EGu3U'></bdo><ul id='EGu3U'></ul>
              <tfoot id='EGu3U'></tfoot>
                • <legend id='EGu3U'><style id='EGu3U'><dir id='EGu3U'><q id='EGu3U'></q></dir></style></legend>
                    <tbody id='EGu3U'></tbody>

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

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

                  本文介绍了.NET 命名空间和 using 语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Possible Duplicate:
                  Should Usings be inside or outside the namespace

                  What is the difference between

                  namespace x
                  {
                    using y;
                  }
                  

                  and

                  using y;
                  namespace x
                  {
                  }
                  

                  ?

                  解决方案

                  The first one has y in scope for just the namespace x, the second has y in scope for the whole file, so potentialy other namespaces. If you keep to one namespace per file (I'd guess that was the convention) then there's usually no real difference [but see Marc's comment about clashes if different types have the same name in different namespaces]. If you use StyleCop it will want you to keep the usings inside the namespace.

                  这篇关于.NET 命名空间和 using 语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:我可以将静态类作为命名空间导入以调用其方法,而无需在 C# 中指定类名吗? 下一篇:XML 反序列化仅适用于 xml 中的命名空间

                  相关文章

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

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

                    <tfoot id='jo3Gs'></tfoot>

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

                    1. <legend id='jo3Gs'><style id='jo3Gs'><dir id='jo3Gs'><q id='jo3Gs'></q></dir></style></legend>