Having a separate dll when you can have the code itself is not a good
option. Many reasons: different versions then have to be strictly
maintained.. if the version of the client changes, JIT will not be able
to do many optimizations it does with code that have the same versions
(for example inlining methods).. furthermore, there are many other JIT
optimizations that can be easily performed if code is in the same file
because then the JIT compiler is at liberty to move around data and
instructions to get the best out of it while with separate dlls, it
won't be able to do so... (as many other applications can be using that
dll at the same time and changing or moving data around in that dll
would be a no-no). Again, the point is that if you *can* have the code
in one file and you don't need to share that code with many
applications, then you should definitely go for the other option (of
including the code).. but if you have other plans then go for the dll :)
-Andre
Champika Nirosh wrote:
Hi,
I have written a sperate appliaction for error logging and now I have two
options
one is to create a dll and give it to fellow developer and allow them to add
the reference while keeping the dll in the working folder
or
give them the cs file so then they can add (the code itself) it to their
solution and use it
Let me have some explaination (strick) on performance gain or loose of each
of these method.
Nirosh.