Groups | Blog | Home
all groups > vj# > january 2004 >

vj# : Enum


MS Public
1/20/2004 2:03:06 PM
What is the correct syntax for the enum statement in j#. I have tried this

public enum myEnum
{
ABC =1,
DEF=2
}

That did not work but

public enum myEnum = ABC=1,DEF=2; //did work

What should it be ?


Lars-Inge Tønnessen
1/20/2004 7:39:49 PM

Java does not support the "C enum" keyword for defining types that consists
of one of a specified number of named values. Enumerated types can be
simulated with the use of static final constant values or the
java.util.Enumeration interface API that you have to implement.

--
Regards,
Lars-Inge Tonnessen
http://emailme.larsinge.com
http://www.larsinge.com

MS Public
1/21/2004 1:14:21 PM
I discovered that Java does not have an enum. So therfore it is not in J#

Thanx

[quoted text, click to view]

AddThis Social Bookmark Button