Michael,
>After compilation, I used ILDASM to inspect the assembly DLLs.
>Just found there are two more system assemblies(Microsoft.VisualBasic &
>System) referenced by VB.NET than C#
>
>Can anyone tell me why?
Microsoft.VisualBasic.dll is always referenced by VB programs.
System.dll shouldn't have to be there. But you probably referenced it
during compilation, and unlike the C# compiler, VB (prior to Whidbey)
doesn't remove unused references.
>People always said on the .NET platform all the languages are same
>including VB.NET & C#.
Don't believe them.
>I just found another thing I cannot understand is:
>vbHello.DLL is bigger than csHello.DLL
Is that a problem?
Unoptimized VB code tends to have more nop instructions than C#, for
debugability reasons. It can also have unused assemblyrefs as you
already have seen. If you want a fair comparison you should look at
optimized code and manually remove any references you don't need.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Anthony Moore - 28 Jul 2004 00:41 GMT
It would be more accurate to say that there are generally few differences
between the code generated by .NET languages rather than they are the same.
Those statements began at a time when languages like VB6, Java and C++ all
had completely different execution environments, so the .NET langauges are
all very simlar by those standards.
--------------------
| From: Mattias Sj?gren <mattias.dont.want.spam@mvps.org>
| Subject: Re: Why the Microsoft.VisualBasic in Manifest
[quoted text clipped - 42 lines]
|
| Mattias
Whenever you start a new project in VB.Net, the Microsoft Visual Basic is
referenced.
To remove it, open your project properties and go to "Common
Prloperties->Imports". Remove Microsoft.VisualBasic.Compatibility.
Be warned that you may have many errors after removing it because a lot of
VB.Old programmers still use the old syntax.

Signature
HTH
?ric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com)
> Hello,
>
[quoted text clipped - 56 lines]
> Thanks,
> Mike