一个强类型数据集是什么? [英] What is a strongly typed dataset?
本文介绍了一个强类型数据集是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
一个强类型数据集是什么? (.NET)
What is a strongly typed dataset? (.net)
推荐答案
一个强类型数据集是一个具有特定类型的表和字段。
A strongly typed dataset is one that has specific types for the tables and their columns.
您可以说
EmployeeDataset ds = ...
EmployeeRow row = ds.Employees.Rows[0];
row.Name = "Joe";
来代替:
DataSet ds = ...
DataRow row = ds.Tables["Employees"].Rows[0];
row["Name"] = "Joe";
这会有帮助,因为你发现错误在编译时的命名,而不是运行时间,也加强了对列的类型。
This helps because you catch mistakes in naming at compile time, rather than run time and also enforces types on columns.
这篇关于一个强类型数据集是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文