473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

enums in mc++

My current project is a makeup of both C#.Net 1.1 and MC++. Is there
any way to define an enum in MC++ that I can use ToString on in C# to
get the text value?
Dec 13 '07 #1
4 1087

"Cartoper" <ca******@gmail.comwrote in message
news:93**********************************@i29g2000 prf.googlegroups.com...
My current project is a makeup of both C#.Net 1.1 and MC++. Is there
any way to define an enum in MC++ that I can use ToString on in C# to
get the text value?
Did you try "__gc enum"?

However, MC++ is buggy and you really need to migrate to C++/CLI as soon as
possible.

In C++/CLI, it would be "enum class".
Dec 13 '07 #2
On Dec 13, 4:55 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospamwrote:
"Cartoper" <carto...@gmail.comwrote in message

news:93**********************************@i29g2000 prf.googlegroups.com...
My current project is a makeup of both C#.Net 1.1 and MC++. Is there
any way to define an enum in MC++ that I can use ToString on in C# to
get the text value?

Did you try "__gc enum"?

However, MC++ is buggy and you really need to migrate to C++/CLI as soon as
possible.

In C++/CLI, it would be "enum class".
Oh trust me, if I had my say it would be in .Net 3.5, but the powers
that be want it keep this in 1.1, I think it is nuts, but it is what
it is!
Dec 13 '07 #3

"Cartoper" <ca******@gmail.comwrote in message
news:da**********************************@e25g2000 prg.googlegroups.com...
On Dec 13, 4:55 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospamwrote:
>"Cartoper" <carto...@gmail.comwrote in message

news:93**********************************@i29g200 0prf.googlegroups.com...
My current project is a makeup of both C#.Net 1.1 and MC++. Is there
any way to define an enum in MC++ that I can use ToString on in C# to
get the text value?

Did you try "__gc enum"?

However, MC++ is buggy and you really need to migrate to C++/CLI as soon
as
possible.

In C++/CLI, it would be "enum class".

Oh trust me, if I had my say it would be in .Net 3.5, but the powers
that be want it keep this in 1.1, I think it is nuts, but it is what
it is!
Ask them why they don't run it on NT 3.51. Virtually every argument for
upgrading the OS (security, new features, bug fixes, vendor support, etc)
applies to a middleware platform such as .NET.
Dec 13 '07 #4

"Ben Voigt [C++ MVP]" <rb*@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>
"Cartoper" <ca******@gmail.comwrote in message
news:93**********************************@i29g2000 prf.googlegroups.com...
>My current project is a makeup of both C#.Net 1.1 and MC++. Is there
any way to define an enum in MC++ that I can use ToString on in C# to
get the text value?

Did you try "__gc enum"?
Sorry, it is "__value enum".
http://msdn2.microsoft.com/en-us/lib...60(VS.71).aspx
>
However, MC++ is buggy and you really need to migrate to C++/CLI as soon
as possible.

In C++/CLI, it would be "enum class".

Dec 13 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: SpaceCowboy | last post by:
I recently got into a discussion with a co-worker about using enums across a dll interface. He wanted to use chars instead, argueing that depending on compiler settings the size of an enum could...
2
by: Faisal | last post by:
Can anyone tell me if it is possible to enumerate through all the Enums within a class . I have a class with many Enums and would like to accees the Enums through an array/collection etc. I can't...
27
by: Mark A. Gibbs | last post by:
i have been toying with the idea of making my enums smarter - ie, more in line with the rest of the language. i haven't tested it yet, but what i came up with is a template like this: template...
4
by: Martin Pritchard | last post by:
Hi, I'm working on a project that historically contains around 40 enums. In the database various fields refer to the int values of these enums, but of course ref integrity is not enofrced and...
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a...
2
by: Lev | last post by:
Hi, I have some code that does reflection on an assembly I load. When I try to get the attributes on one of the methods implemented in the assembly, the MC++ version does not return anything....
2
by: Simon Elliott | last post by:
I have some legacy C++ code which requires some enums to be 1 or 2 bytes in size. I'd ideally like to be able to specify that a few carefully selected enums are a particular size. By default,...
11
by: Marc Gravell | last post by:
This one stumped me while refactoring some code to use generics... Suppose I declare an enum MyEnum {...} Is there a good reason why MyEnum doesn't implement IEquatable<MyEnum> ? Of course,...
8
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.