I have a C ++ file containing persistent definitions, I want to use the same definitions in a C # project. Since both projects are part of a larger project, I want if there is a change in the C ++ file (add / remove), it should also be reflected in the corresponding C # file. I want to keep 2 files in sync. I was wondering if there is a script / tool for this.
The reverse solution will also work (C # โ C ++).
Clarification:
Currently code:
//C++ struct Colors{ static const int Red = 100; //Custom Values are important static const int Green = 101; } //C
Now I want to have one file, so that any changes in C ++ are reflected in C # (or vice versa), so that I can have one file for projects for these constants.
As you can see, I want to map a bunch of constants defined in a structure in C ++ to an enumeration in C #. I want to make minimal changes above the expected definitions, since in these projects there are other code-dependent (in both projects) (but can do this if there is no good way to do this in the current format)
source share