Brian

Brian

  • NA
  • 5
  • 0

Quick question about enums

Jan 3 2006 2:13 PM
I was wondering... enum Size : int { SIZE_SMALL = 0, SIZE_MEDIUM = 1, SIZE_BIG = 2 } int myInt = 1; string myString = "SIZE_SMALL"; Is there anyway I can access members in the enum "Size" using my 2 variables? (By value or by name)? I don't want to just get the name, or get the value, I want a reference to that particular constant.

Answers (2)