Duplicate
What is the difference between net components and com components
What is the exact difference between COM and .NET? Is .NET a simple cloak of COM or is it something completly different?
What is the difference between net components and com components
What is the exact difference between COM and .NET? Is .NET a simple cloak of COM or is it something completly different?
As Monty Python would say it is something completely different. .NET for one allows you the choice of "registering" (GAC) or not (local directory). But there is not one exact difference.
Completely different...
.NET provides an entire set of languages on top of a common runtime (not to mention JIT compilation and MSIL).
COM really provided a way to register shared assemblies and re-use code via a layer above the software.
.NET provides a virtual machine, an extensive code library and a Java-like bytecode (Intermediate Language) into which your programs are compiled.
COM is simply a binary interoperability standard for creating objects and allowing them to interact with each other.
.NET supports COM communication, as well as a number of other interop models. It's a much, much bigger deal than COM in itself.
There are quite a lot of differences, .NET is definitely not a cloak for COM.
Some major differences are:
Although both COM and .NET compile to DLL files, .NET DLLs (called Assemblies) are run using the Common Language Runtime, a virtual machine that looks after certain things such as Memory management, threads, garbage collection and security as the code is running.
.NET Assemblies do not necessarily need to be 'registered', wheres COM DLL's need to be registered in the computer's registry.
.NET comes with a whole framework of objects that can be built on, used, or extended to achieve various tasks. The framework is much more comprehensive than the COM libraries that came with the old Visual Studio packages.
I'm sure there's a lot more that could be said ... you could almost think of .NET as an extra operating system layer that runs on top of Windows - its that extensive. The wikipedia entry for .NET Framework might be a good place to start reading up.
.NET has been introduced as a next step after COM to overcome COM problems. Just to mention some advantages:
Microsoft has used COM for tecnologies from the 90's: OLE, ActiveX, DirectX, etc. These technologies are still being developed with COM. However, new modern technologies are using .NET: Windows Presentation Foundation (WPF), Windows Communitation Foundation (WCF), lots of research projects...