DllImport for a group of imported functions
c#
Solution
No. The only way to avoid it is to write a ref class wrapper in C++/CLI. Which lets you #include the C header file directly. Your C# project can then simple add the reference to the C++/CLI generated assembly. This avoids lots of accidents, you now get compiler error messages when you declare something wrong, but isn't exactly competitive with the pinvoke declarations if cutting lines of code is your only objective.
Problem
Is there any way to specify same DllImport attribute for a group of external functions, any analogue to `extern "C" { … }` ? I don't like to repeat it for every function declaration :-)