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

        .NET namespaces and using statements(.NET 命名空间和 using 语句)
              <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# namespace alias - what#39;s the point?(C# 命名空间别名 - 有什么意义?)
                  Using Xpath With Default Namespace in C#(在 C# 中使用具有默认命名空间的 Xpath)
                  IBM.Data.DB2.Core connection problems(IBM.Data.DB2.Core 连接问题)
                  Datetime field overflow with IBM Data Server Client v9.7fp5(IBM Data Server Client v9.7fp5 的日期时间字段溢出)
                  Using entity Framework with .NET Core and DB2(将实体框架与 .NET Core 和 DB2 结合使用)
                  IBM .NET Data Provider Connection String issue with Library List(库列表的 IBM .NET 数据提供程序连接字符串问题)

                      <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>
                            <tbody id='jo3Gs'></tbody>