性能如何影响到一个使用指令未使用的? [英] How is performance affected by an unused using directive?

查看:198
本文介绍了性能如何影响到一个使用指令未使用的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio会自动创建一个使用语句为你当你创建一个新的页面或项目。其中的一些你永远不会使用。

Visual Studio will automatically create using statements for you whenever you create a new page or project. Some of these you will never use.

Visual Studio中具有实用的功能为删除未使用的usings。

Visual Studio has the useful feature to "remove unused usings".

我不知道是否有对程序性能有任何负面影响,如果使用语句这是从来没有访问,在文件的顶部仍然提及。

I wonder if there is any negative effect on program performance if the using statements which are never accessed, remain mentioned at the top of the file.

推荐答案

这是未使用的使用没有任何影响到应用程序的运行时性能。

An unused using has no impact to the runtime performance of your application.

有可能会影响IDE的性能和整体编译阶段。之所以是,它会在其中必须发生名称解析的额外空间。然而,这些往往是轻微的,不应该有大多数情况下你的IDE体验产生显着影响。

It can affect the performance of the IDE and the overall compilation phase. The reason why is that it creates an additional namespace in which name resolution must occur. However these tend to be minor and shouldn't have a noticeable impact on your IDE experience for most scenarios.

有也可以影响评估前pressions在调试器出于同样的原因的性能。

It can also affect the performance of evaluating expressions in the debugger for the same reasons.

这篇关于性能如何影响到一个使用指令未使用的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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