Hi ,
The using statement does not generate redundant code in the exe file.
Also, it will not generate redundant metadata in manifest.(You can check
this through iLdasm.exe)
The using statement just expose certain dll's metadata information to your
application, so that the compiler can recognize the class and members.
Also, the compiler can generate intellisence for you.
I think you can make sure the "no generate redundant code" by checking the
file size between many "using" file and remove "using" file.
Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "a" <
[email protected]>
| Subject: Having "using" when not necessary, performance hit?
| Date: Wed, 29 Oct 2003 23:31:44 -0800
| Lines: 10
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: d206-116-117-170.bchsia.telus.net 206.116.117.170
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:195287
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Is there a performance hit if I have many "using" statements that are
| unnecessary? For example:
|
| using System.Collections;
|
| when nowhere in my code I'm using System.Collections namespace.
|
| I'm really thinking about the default "using" statements put by VS.NET.
|
|
|