C#中的DataSet和DataTable是什么 [英] what is DataSet and DataTable in C#

查看:79
本文介绍了C#中的DataSet和DataTable是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解数据集和数据表。



我将使用数据集或数据表的地点和原因。哪一个最好,为什么。



我在goolge搜索。但找到很多东西。

任何人都可以轻松地讨论它。



提前谢谢。

I want to know about dataset and datatable.

where and why i will use dataset or datatable. which one is best and why.

I have search in goolge. But finding lot of things.
Can any one discuss it in easy way.

Thanks in advance.

推荐答案

虽然不是想象中最完整的集合,但我想参考MSDN上的文档来获取代表什么的要点,我如何使用它,什么是它支持的方法等...



看看 DataSet [ ^ ], DataTable [ ^ ]
While it is not, by any imagination, the most complete set, I like to refer to the documentation on MSDN to get the gist of what represents, how do I use it, what are the methods it supports etc...

Take a look DataSet[^] , DataTable[^]


一行:

DataSet是DataTables的集合。



以上行本身超过足以解释他们和他们是什么在哪里使用。对吗?



如果没有,那么:

DataTable =一个包含行和列的表格

DataSet =带数据表的集合。可以在其中包含一个或多个数据表。一个数据集的容器。
One line:
DataSet is collection of DataTables.

Above line itself is more than enough to explain what are they and where to use. Right?

In case not, then:
DataTable = A table with rows and columns
DataSet = A set with datatables. Can hold one or more Datatables in it. A container of datatables.


上面的答案分百分比



DataTable是一个包含行和列的表$>


和DataSet是DataTables的一个容器,它可以有许多DataTables,每个DataTable都可以通过其从零开始的索引或字符串名称来识别。 />


The above answer cent per cent rigth

DataTable is a single Table containing row and columns

and DataSet is kind of a container of DataTables, which can have many DataTables, and each DataTable is DataSet can be identified by its zero-based index or string name.

DataSet ds;

ds.Tebles[0] 

or

ds.Tables["tablename"]


这篇关于C#中的DataSet和DataTable是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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