在namespace部分中使用语句 [英] Using statement inside namespace section

查看:82
本文介绍了在namespace部分中使用语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如果我在文件的命名空间部分(Customer.cs)中使用Using语句,我想出了一个教导? />


而不是使用下面的东西



Hi,

I came up with a taught what if i use "Using" statement inside a namespace section in a file (Customer.cs)?

Instead of using something like below

using System;
using System.Windows.Input;
using BusinessControls.PerformanceReport.Data;
using BusinessControls.PerformanceReport.View.PerformanceReport;
using BusinessControls.PerformanceReport.ViewModel.PerformanceReport;

namespace BusinessControls.PerformanceReport.Commands
{
......
}





当我使用这样的东西时会发生什么。





what will happen when i use something like this.

using System;
using System.Windows.Input;


namespace BusinessControls.PerformanceReport.Commands
{
using Data;
using View.PerformanceReport;
using ViewModel.PerformanceReport;
......
}





逻辑上两者相同但是,有一些区别加载。但是我不知道有什么能让人明白的吗?



logically the two are same but, There was some difference in loading. But i don't know what was that can anyone able to figure it out?

推荐答案





见这里的讨论:

http://stackoverflow.com/questions/125319/should-using-statements-be-inside-or-outside-the-namespace [ ^ ]


这篇关于在namespace部分中使用语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆