static void Main(string[] args)
        {
            sbyte    humanSbyte;
            string   humanGender;
            humanSex myHumansex = humanSex.male;

            Console.WriteLine($"Human sex = {myHumansex}" + "\n");
            humanSbyte  = (sbyte)myHumansex;
            humanGender = Convert.ToString(myHumansex);
            Console.WriteLine($"Human Gender index in = {humanSbyte}" + "\n");
            Console.WriteLine($"Human associated with this index = {humanGender}" + "\n");
            Console.ReadKey();
        }
示例#2
0
        static void Main(string[] args)
        {
            sbyte humanSbyte;

            humanSex myhumanSex = humanSex.male;

            Console.WriteLine($"Human Sex =  {myhumanSex}" + "\n");
            humanSbyte = (sbyte)myhumanSex;
            Console.WriteLine($"Human Gender index in  = {humanSbyte}" + "\n");
            string humanGender;

            humanGender = Convert.ToString(myhumanSex);
            Console.WriteLine($"Human associated with this index = {humanGender}" + "\n");
            Console.ReadKey();



            //Q20/ Define an Enum variable for orientation and print the contents usign loop
            //and start from index 2



            /*
             *
             * for more information visit
             * http://www.youtube.com/c/AToZForLearning
             *
             * Visit our channel page on facebook
             * https://www.facebook.com/AToZForLearning/
             *
             * If you have any question in English or Arabic welcome to our facebook group
             * https://www.facebook.com/groups/AToZForLearningProgramming/
             *
             *
             */
        }