I was wondering what is the very top most declared references and why we still need to use DllImport? I'm talking C#.
From the MDSN documentation:
The DllImport attribute is very useful when reusing existing unmanaged code in a managed application. For instance, your managed application might need to make calls to the unmanaged WIN32 API.
Basically, when you're writing a .NET application, and a library does not have a managed wrapper (it's written in unmanaged code), you need to use DllImport to interoperate with it. Otherwise, you can reference managed libraries with a using
statement like you normally would any base class library.