Reach managed c++ Enum from C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to use an enum created in Managed c++ in a C# project. I can reach
the enums name, i.e.

namespace MyNS
{
public enum MyEnum
{
EOne,
ETwo
};
}

in C++ makes me able to reach MyEnum, but not MyEnum.EOne. Why?
 
I'm trying to use an enum created in Managed c++ in a C# project. I can
reach
the enums name, i.e.

namespace MyNS
{
public enum MyEnum
{
EOne,
ETwo
};
}

in C++ makes me able to reach MyEnum, but not MyEnum.EOne. Why?

That should be
public __value enum MyEnum
the __value turns into a 'real' managed enum.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top