菜单驱动控制台应用?

菜单驱动控制台应用?

问题描述:

我正在员工系统上创建一个菜单驱动的应用程序。在控制台应用程序中,您可以从用户获取值,即命名性等,然后在下一个选项中再次显示它。我知道如何使用它数据库连接非常简单,但我还没有在控制台应用程序上工作。我可以完成这个请帮助我。如果你有一些行业记录或员工类型的应用程序的代码,请发送给我hemantc87@gmail.com

菜单是这样的

1添加新员工。

2显示员工。

3编辑员工

4删除员工

5退出

i am creating a menu driven application on a employee system.Is it possible in a console application that you can take value i.e name sex etc from user and then display it again in the next option.I know how to do it with database connectivity which is quite simple but i haven't worked on console applications before.how can i accomplish this please help me out.If u have the code of some industry record or employee type application please send me at hemantc87@gmail.com
the menu is like this
1 Add new employee.
2 Show employees.
3 Edit employees
4 Delete employees
5 exit

只需从问题中获取答案,保存并使用值在下一个问题中显示。这是相当基本的C#;如果您无法理解这些概念,那么我建议您阅读参考文档中有关输入/输出流的部分。
Just take the answers from the question, save them and use the values as display in your next question. This is fairly basic C#; if you have trouble understanding these concepts then I suggest reading through the section on Input/Output streams in your reference documentation.


这个 [ ^ ]应该可以帮助您入门。我建议你在开始之前阅读一本C#书...
This[^] should help you get started. I would suggest you read a C# book before you start though...


我已经通过键盘输入使用add function.how我可以使用存储在add函数中的名称来显示功能



i have taken the input through keyboard using add function.how can i use the name stored in add function in a show function

static void add(employee em)
        {
            
            Console.WriteLine("Enter Name");
            string name;
            name= Console.ReadLine();
            name = em.Name;



如何将名称变量中存储的名称用于静态show函数中以显示存储的数据?


how can the name stored in name variable be used in a static show function to display data stored??