views:

70

answers:

2

Hello,

I am working on C# for a few mounths. Mainly I am working on C++. On C++ using the visual studio if I wanted to add a a static library I could add it using the configuration of the project add the header and lib and path. When using C#, I think it is something like DLL, all those assemblies are complied on late binding ? In addition using the visual studio for the C# I can add a reference. Is this the equel thing as I wrote in the beginning of the question ? only for something like DLL ?

A: 

C# is managed, and everything you reference as an assembly gets linked at runtime, as with DLL's in C++. The compiler will check at compile time that you are using your assemblies properly, but it wont link them yet. You can use http://research.microsoft.com/en-us/people/mbarnett/ILMerge.aspx to merge assemblies together, as a post-build step.

Scott
+1  A: 

If your want use a Win32 DLL in C#, you must write a C# wrapper for it.

Cook Schelling
see http://pinvoke.net/ for help on Win32 from .NET.
kenny