Revision: 68230
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 16, 2014 10:37 by xXxPizzaBreakfastxXx
Initial Code
CS:
-------------------
#if !cpp
using System;
namespace MyProject
{
class ECommandEnum
{
public //enum CommandEnum
#endif
enum CommandEnum
{
Move = 0,
Wait
};
#if !cpp
}
}
#endif
CPP:
-------------------
#include "whatever.h"
#define cpp (1)
#include "F:\dev\MyProject\CommandEnum.cs"
int main()
{
}
Initial URL
cs_cpp_shared_enum
Initial Description
If you are using c++/cli or UnmanagedExports, this is a useful way to share enum int values between c++ and c# code/DLLs without worrying about duplicated code going out of date.
Initial Title
C#/C++ Shared enum
Initial Tags
c, c#, c++
Initial Language
C#