Good day friends, so we have a homework about areas of a circle, rectangle, and cylinder. Now I know how to code this entire program in c++, but in c sharp, not that much because I am only starting to learn c sharp this term.

Anyway here is my question: How do you make a main menu in c#, the ones like in c++ when you get to use functions for an easier call for your choice.


Choose below(Press only the number)

1. Area of Circle
2. Area of Rectangle
3. Area of Cylinder

>>(User inputs number here)

I am only asking for the main menu C sharp code not the whole program so please help me out. Thank you for those who will help. God Bless!

Re: main menu for C# program 80 80

Look at the Console class. You can use a combination of the Write(), WriteLine(), Read(), ReadKey() and ReadLine() methods.

Re: main menu for C# program 80 80

You could also have a look in the code snippet section of the C# forum here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.