Do namespace usage cause overhead?

  • Thread starter Thread starter Peter Rilling
  • Start date Start date
P

Peter Rilling

Just wondering, does declaring namespaces in a code file cause overhead in
the system? Are there performance issues with declaring namespaces that are
never used?
 
Peter,
Just wondering, does declaring namespaces in a code file cause overhead in
the system? Are there performance issues with declaring namespaces that are
never used?

No



Mattias
 
Hello,
This used to be a problem before; but with dotnet, this isn't an issue
anymore.
 
as far as I can tell namespaces are just a method of organising code
to allow for more scope when naming classes and members. there should
be no overhead.

An unused namespace would be like any other unused section of code -
redundant. it just takes up space in the assembly.

Someone with knowledge of IL may be able to tell you more
 
Back
Top