如何将类中的数据表用于主程序 [英] How to use the datatable in a class to the Main program

查看:62
本文介绍了如何将类中的数据表用于主程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写过以下程序

我在命名空间中创建了另一个类DataAccess.cs。我必须在Main类内部调用此EmployeeData。请帮助 

I have created another class DataAccess.cs in the namespace. I have to call this EmployeeData  in inside of the Main class. Please can you help 

问候

Pol

polachan

推荐答案

看似直截了当但没有说明我可以说是使用控制台方法从用户那里获得输入,验证用户输入,创建类的实例,传递用户输入值和然后处理数据。我没有提供代码示例,因为您的
不清楚您的问题。

Seems straight forward yet without clarification all I can say is get input from user using console method, validate user input, create a instance of the class, pass the user input value and then process the data. I' not supplying code example because you are not clear with your question.

此外,将来,在发布代码时使用代码按钮。

Also, in the future, use the code button when posting code.


这篇关于如何将类中的数据表用于主程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆