I want to make something like the following pseudo-code work:
#define IMPORT = [DllImport ("MyDLL")] private static extern;
public class MyClass ... {
IMPORT void my_function();
....
}
However, it would seem that #define works quite differently than in C/C++. Is there an equivalent for this in C#?
I know that #define will NOT work this way in C#, but if want to have the same functionality, how would it be done in C#? Are there any language features that allow for this?