What is the advantage of using .NET DLL instead of COM?

N

Nick

Hi,

I would like to know what is the advantage of using .NET DLL instead of
using COM DLL in my C# application...

Currently, I have two options, using .NET DLL or COM DLL

Besides .NET DLL is managed (more safe), I would like to know will I
gain performance when I call unmanaged COM DLL instead of .NET DLL in
my C# program?

THanks!

Nick
 
J

Jon Skeet [C# MVP]

Nick said:
I would like to know what is the advantage of using .NET DLL instead of
using COM DLL in my C# application...

Currently, I have two options, using .NET DLL or COM DLL

Besides .NET DLL is managed (more safe), I would like to know will I
gain performance when I call unmanaged COM DLL instead of .NET DLL in
my C# program?

Using COM would involve marshalling for each method call. A few things
may be a bit faster in unmanaged code, but for the most part keeping it
all managed would be a lot simpler - and easier to debug!
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi Nick,


I dont quite understand your escenario, are you saying that you have the
same functionality implemented both in managed (.net ) and unmanaged
versions?

if your client ( app that will use the dll ) is managed you should use the
..net version for the simple reason explained by john

cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top