强类型数据集与弱类型数据集 [英] Strongly typed datasets vs. weakly typed datasets

查看:157
本文介绍了强类型数据集与弱类型数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.Net中强类型数据集的含义是什么?有没有人可以用一个清晰​​简单的例子来解释?



而且,强类型和弱类型数据集有什么区别?

解决方案

强类型数据集是基于Db架构生成的。它们由派生自DataSet,DataTable和DataRow的类组成。 Db列成为TableRow派生类的正确类型属性。



一个非类型数据集仅仅意​​味着直接使用Dataset而不是后代。



没有像弱类型数据集这样的东西。


What is meant by strongly typed datasets in .Net? Can anybody explain with a clear and brief example?

And also, what is the difference between strongly typed and weakly typed datasets?

解决方案

Strongly Typed Datasets are generated on the basis of a Db Schema. They consists of classes derived form DataSet, DataTable and DataRow. Db Columns become correctly typed properties of the TableRow derived class.

An Untyped Dataset simply means the direct use of Dataset, not of a descendant. All column access has to be type-cast.

There is no such thing as a Weakly Typed Dataset.

这篇关于强类型数据集与弱类型数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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