Click here to Skip to main content
12,453,354 members (59,082 online)
Click here to Skip to main content

Tagged as

Stats

10.2K views
10 bookmarked
Posted

Human readable strings for enum elements

, 12 Aug 2010 CPOL
Using enum really helps readability, but the values within the enum must understandably conform to the rules for variables names. This is fine until you need to display enum values to the user. This tip shows you how to associate and access a human readable string with each enum element.
No downloads associated with this content

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

OriginalGriff
CEO
Wales Wales
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160826.1 | Last Updated 12 Aug 2010
Article Copyright 2010 by OriginalGriff
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid