Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

classes, enum in console applications

$
0
0

I have an class that asks for some defined questions that have defined answers. The problem is I never done this before and I still have some problems getting this to work. Here's my class below.

class Personal
{
        public enum FaceOptions
        {
            Glasses = "Glasses",
            Contacts = "Contacts",
            NONE = "NONE",
        }

        public enum Sex
        {
            Male = "Male",
            Female = "Female",
        }

}

What I am trying to do is use a foreach loop to display the options for each enum and give the user an option to pick one. Well I tried some of my ideas and nothing works. Can some one please show me how to do this.


Pro-Forums
Delta Force Barracks
On the Frontlines


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>