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.

Ex.

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!

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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.