Does "use" provide any benefits?

When you reference certain methods, you can use usingor explicitly type in the entire namespace. Are there any advantages in speed of using one method over another, or just simply simplifying the typing of the entire namespace? thank

+3
source share
3 answers

There is no difference at runtime.

In .NET metadata, a type is always represented using a fully qualified name, which includes a namespace, so the directive usingknown from C # will disappear when the program is compiled.

( ), using namespace (., , ), .

+6

. IL, .

+3

Are we all forgetting about extension methods? As far as I know, they cannot be pulled into frames without a namespace directive using.

0
source