In your C# project properties on the Build tab, add a conditional compilation symbol called C_SHARP
Then create a new file in the C# project to hold the Enums. Here I’ve created an enum called AlarmEnum in the namespace Models in a file called commonAlarms.cs
AL_NONE = 0,
AL_VACUUM_TRIP = 2,
AL_DOOR_OPEN = 3,
AL_AIR_FAIL = 4,
Then in your C++ project, add a Header file whose contest is :
you will need to add the path to the include filename or add it to the Include Directories in the VC++ Directories page of the project properties. Now they can both use the same enum and should never get out of sync.