TypedTableBase<T> 类

定义

Visual Studio 和 XSD.exe .NET Framework 工具将此类型用作特型 DataTable 对象生成的基类,并且不能直接从代码中使用此类型。This type is used as a base class for typed-DataTable object generation by Visual Studio and the XSD.exe .NET Framework tool, and is not intended to be used directly from your code.

generic <typename T>
 where T : DataRowpublic ref class TypedTableBase abstract : System::Data::DataTable, System::Collections::Generic::IEnumerable<T>
[System.Serializable]
public abstract class TypedTableBase<T> : System.Data.DataTable, System.Collections.Generic.IEnumerable<T> where T : DataRow
type TypedTableBase<'T (requires 'T :> DataRow)> = class
    inherit DataTable
    interface seq<'T (requires 'T :> DataRow)>
    interface IEnumerable
Public MustInherit Class TypedTableBase(Of T)
Inherits DataTable
Implements IEnumerable(Of T)

类型参数

T

由表表示的源序列中的对象的类型,通常为 DataRowThe type of objects in the source sequence represented by the table, typically DataRow.

继承
属性
实现

构造函数

TypedTableBase<T>()

初始化新的 TypedTableBase<T>Initializes a new TypedTableBase<T>. 此方法支持通过 Visual Studio 和 XSD.exe .NET Framework 工具生成类型化 DataTable 对象。This method supports typed-DataTable object generation by Visual Studio and the XSD.exe .NET Framework tool. 不应直接从代码中使用此类型。This type is not intended to be used directly from your code.

TypedTableBase<T>(SerializationInfo, StreamingContext)

初始化新的 TypedTableBase<T>Initializes a new TypedTableBase<T>. 此方法支持通过 Visual Studio 和 XSD.exe .NET Framework 工具生成类型化 DataTable 对象。This method supports typed-DataTable object generation by Visual Studio and the XSD.exe .NET Framework tool. 此方法不能直接在代码中使用。This method is not intended to be used directly from your code.

字段

fInitInProgress

检查是否正在进行初始化。Checks whether initialization is in progress. 初始化发生在运行时。The initialization occurs at run time.

(继承自 DataTable)

属性

CaseSensitive

指示表中的字符串比较是否区分大小写。Indicates whether string comparisons within the table are case-sensitive.

(继承自 DataTable)
ChildRelations

获取此 DataTable 的子关系的集合。Gets the collection of child relations for this DataTable.

(继承自 DataTable)
Columns

获取属于该表的列的集合。Gets the collection of columns that belong to this table.

(继承自 DataTable)
Constraints

获取由该表维护的约束的集合。Gets the collection of constraints maintained by this table.

(继承自 DataTable)
Container

获取组件的容器。Gets the container for the component.

(继承自 MarshalByValueComponent)
DataSet

获取此表所属的 DataSetGets the DataSet to which this table belongs.

(继承自 DataTable)
DefaultView

获取可能包含筛选视图或游标位置的表的自定义视图。Gets a customized view of the table that may include a filtered view, or a cursor position.

(继承自 DataTable)
DesignMode

获取指示组件当前是否处于设计模式的值。Gets a value indicating whether the component is currently in design mode.

(继承自 MarshalByValueComponent)
DisplayExpression

获取或设置一个表达式,该表达式返回的值用于在用户界面中表示此表。Gets or sets the expression that returns a value used to represent this table in the user interface. DisplayExpression 属性用于在用户界面中显示此表名。The DisplayExpression property lets you display the name of this table in a user interface.

(继承自 DataTable)
Events

获取附加到该组件的事件处理程序的列表。Gets the list of event handlers that are attached to this component.

(继承自 MarshalByValueComponent)
ExtendedProperties

获取自定义用户信息的集合。Gets the collection of customized user information.

(继承自 DataTable)
HasErrors

获取一个值,该值指示该表所属的 DataSet 的任何表的任何行中是否有错误。Gets a value indicating whether there are errors in any of the rows in any of the tables of the DataSet to which the table belongs.

(继承自 DataTable)
IsInitialized

获取一个值,该值指示是否已初始化 DataTableGets a value that indicates whether the DataTable is initialized.

(继承自 DataTable)
Locale

获取或设置用于比较表中字符串的区域设置信息。Gets or sets the locale information used to compare strings within the table.

(继承自 DataTable)
MinimumCapacity

获取或设置该表最初的起始大小。Gets or sets the initial starting size for this table.

(继承自 DataTable)
Namespace

获取或设置 DataTable 中所存储数据的 XML 表示形式的命名空间。Gets or sets the namespace for the XML representation of the data stored in the DataTable.

(继承自 DataTable)
ParentRelations

获取该 DataTable 的父关系的集合。Gets the collection of parent relations for this DataTable.

(继承自 DataTable)
Prefix

获取或设置 DataTable 中所存储数据的 XML 表示形式的命名空间。Gets or sets the namespace for the XML representation of the data stored in the DataTable.

(继承自 DataTable)
PrimaryKey

获取或设置用作数据表主键的列数组。Gets or sets an array of columns that function as primary keys for the data table.

(继承自 DataTable)
RemotingFormat

获取或设置序列化格式。Gets or sets the serialization format.

(继承自 DataTable)
Rows

获取属于该表的行的集合。Gets the collection of rows that belong to this table.

(继承自 DataTable)
Site

获取或设置 DataTableISiteGets or sets an ISite for the DataTable.

(继承自 DataTable)
TableName

获取或设置 DataTable 的名称。Gets or sets the name of the DataTable.

(继承自 DataTable)

方法

AcceptChanges()

提交自上次调用 AcceptChanges() 以来对该表进行的所有更改。Commits all the changes made to this table since the last time AcceptChanges() was called.

(继承自 DataTable)
BeginInit()

开始初始化在窗体上使用或由另一个组件使用的 DataTableBegins the initialization of a DataTable that is used on a form or used by another component. 初始化发生在运行时。The initialization occurs at run time.

(继承自 DataTable)
BeginLoadData()

加载数据时,关闭通知、索引维护和约束。Turns off notifications, index maintenance, and constraints while loading data.

(继承自 DataTable)
Cast<TResult>()

TypedTableBase<T> 的元素转换为指定的类型。Converts the elements of an TypedTableBase<T> to the specified type. 此方法支持通过 Visual Studio 和 XSD.exe .NET Framework 工具生成类型化 DataTable 对象。This method supports typed DataTable object generation by Visual Studio and the XSD.exe .NET Framework tool. 此方法不能直接在代码中使用。This method is not intended to be used directly from your code.

Clear()

清除所有数据的 DataTableClears the DataTable of all data.

(继承自 DataTable)
Clone()

克隆 DataTable 的结构,包括所有 DataTable 架构和约束。Clones the structure of the DataTable, including all DataTable schemas and constraints.

(继承自 DataTable)
Compute(String, String)

计算用来传递筛选条件的当前行上的给定表达式。Computes the given expression on the current rows that pass the filter criteria.

(继承自 DataTable)
Copy()

复制该 DataTable 的结构和数据。Copies both the structure and data for this DataTable.

(继承自 DataTable)
CreateDataReader()

返回与此 DataTable 内的数据对应的 DataTableReaderReturns a DataTableReader corresponding to the data within this DataTable.

(继承自 DataTable)
CreateInstance()

创建 DataTable 的新实例。Creates a new instance of DataTable.

(继承自 DataTable)
Dispose()

释放由 MarshalByValueComponent 使用的所有资源。Releases all resources used by the MarshalByValueComponent.

(继承自 MarshalByValueComponent)
Dispose(Boolean)

释放由 MarshalByValueComponent 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the MarshalByValueComponent and optionally releases the managed resources.

(继承自 MarshalByValueComponent)
EndInit()

结束在窗体上使用或由另一个组件使用的 DataTable 的初始化。Ends the initialization of a DataTable that is used on a form or used by another component. 初始化发生在运行时。The initialization occurs at run time.

(继承自 DataTable)
EndLoadData()

加载数据后,打开通知、索引维护和约束。Turns on notifications, index maintenance, and constraints after loading data.

(继承自 DataTable)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetChanges()

获取 DataTable 的副本,该副本包含自加载以来或自上次调用 AcceptChanges() 以来进行的所有更改。Gets a copy of the DataTable that contains all changes made to it since it was loaded or AcceptChanges() was last called.

(继承自 DataTable)
GetChanges(DataRowState)

获取由 DataRowState 筛选的 DataTable 的副本,该副本包含上次加载以来或调用 AcceptChanges() 以来进行的所有更改。Gets a copy of the DataTable containing all changes made to it since it was last loaded, or since AcceptChanges() was called, filtered by DataRowState.

(继承自 DataTable)
GetEnumerator()

返回类型化 DataRow 的枚举数。Returns an enumerator for the typed-DataRow. 此方法支持通过 Visual Studio 和 XSD.exe .NET Framework 工具生成类型化 DataTable 对象。This method supports typed-DataTable object generation by Visual Studio and the XSD.exe .NET Framework tool. 此方法不能直接在代码中使用。This method is not intended to be used directly from your code.

GetErrors()

获取包含错误的 DataRow 对象数组。Gets an array of DataRow objects that contain errors.

(继承自 DataTable)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetObjectData(SerializationInfo, StreamingContext)

使用序列化 DataTable 时所需的数据填充序列化信息对象。Populates a serialization information object with the data needed to serialize the DataTable.

(继承自 DataTable)
GetRowType()

获取行类型。Gets the row type.

(继承自 DataTable)
GetSchema()

有关此成员的说明,请参见 GetSchema()For a description of this member, see GetSchema().

(继承自 DataTable)
GetService(Type)

获取 IServiceProvider 的实施者。Gets the implementer of the IServiceProvider.

(继承自 MarshalByValueComponent)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
ImportRow(DataRow)

DataRow 复制到 DataTable 中,保留任何属性设置以及初始值和当前值。Copies a DataRow into a DataTable, preserving any property settings, as well as original and current values.

(继承自 DataTable)
Load(IDataReader)

通过所提供的 IDataReader,用某个数据源的值填充 DataTableFills a DataTable with values from a data source using the supplied IDataReader. 如果 DataTable 已经包含行,则从数据源传入的数据与现有行合并。If the DataTable already contains rows, the incoming data from the data source is merged with the existing rows.

(继承自 DataTable)
Load(IDataReader, LoadOption)

通过所提供的 IDataReader,用某个数据源的值填充 DataTableFills a DataTable with values from a data source using the supplied IDataReader. 如果 DataTable 已包含行,则从数据源传入的数据根据 loadOption 参数的值与现有行合并。If the DataTable already contains rows, the incoming data from the data source is merged with the existing rows according to the value of the loadOption parameter.

(继承自 DataTable)
Load(IDataReader, LoadOption, FillErrorEventHandler)

通过所提供的使用错误处理委托的 IDataReader,用某个数据源中的值填充 DataTableFills a DataTable with values from a data source using the supplied IDataReader using an error-handling delegate.

(继承自 DataTable)
LoadDataRow(Object[], Boolean)

查找和更新特定行。Finds and updates a specific row. 如果找不到任何匹配行,则使用给定值创建新行。If no matching row is found, a new row is created using the given values.

(继承自 DataTable)
LoadDataRow(Object[], LoadOption)

查找和更新特定行。Finds and updates a specific row. 如果找不到任何匹配行,则使用给定值创建新行。If no matching row is found, a new row is created using the given values.

(继承自 DataTable)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Merge(DataTable)

将指定的 DataTable 与当前 DataTable 合并。Merge the specified DataTable with the current DataTable.

(继承自 DataTable)
Merge(DataTable, Boolean)

将指定的 DataTable 与当前 DataTable 合并,指示是否保留当前 DataTable 中的更改。Merge the specified DataTable with the current DataTable, indicating whether to preserve changes in the current DataTable.

(继承自 DataTable)
Merge(DataTable, Boolean, MissingSchemaAction)

将指定的 DataTable 与当前 DataTable 合并,指示是否保留更改以及如何处理当前 DataTable 中缺失的架构。Merge the specified DataTable with the current DataTable, indicating whether to preserve changes and how to handle missing schema in the current DataTable.

(继承自 DataTable)
NewRow()

创建与该表具有相同架构的新 DataRowCreates a new DataRow with the same schema as the table.

(继承自 DataTable)
NewRowArray(Int32)

返回 DataRow 的数组。Returns an array of DataRow.

(继承自 DataTable)
NewRowFromBuilder(DataRowBuilder)

从现有行创建新行。Creates a new row from an existing row.

(继承自 DataTable)
OnColumnChanged(DataColumnChangeEventArgs)

引发 ColumnChanged 事件。Raises the ColumnChanged event.

(继承自 DataTable)
OnColumnChanging(DataColumnChangeEventArgs)

引发 ColumnChanging 事件。Raises the ColumnChanging event.

(继承自 DataTable)
OnPropertyChanging(PropertyChangedEventArgs)

引发 PropertyChanged 事件。Raises the PropertyChanged event.

(继承自 DataTable)
OnRemoveColumn(DataColumn)

通知 DataTable 正在移除 DataColumnNotifies the DataTable that a DataColumn is being removed.

(继承自 DataTable)
OnRowChanged(DataRowChangeEventArgs)

引发 RowChanged 事件。Raises the RowChanged event.

(继承自 DataTable)
OnRowChanging(DataRowChangeEventArgs)

引发 RowChanging 事件。Raises the RowChanging event.

(继承自 DataTable)
OnRowDeleted(DataRowChangeEventArgs)

引发 RowDeleted 事件。Raises the RowDeleted event.

(继承自 DataTable)
OnRowDeleting(DataRowChangeEventArgs)

引发 RowDeleting 事件。Raises the RowDeleting event.

(继承自 DataTable)
OnTableCleared(DataTableClearEventArgs)

引发 TableCleared 事件。Raises the TableCleared event.

(继承自 DataTable)
OnTableClearing(DataTableClearEventArgs)

引发 TableClearing 事件。Raises the TableClearing event.

(继承自 DataTable)
OnTableNewRow(DataTableNewRowEventArgs)

引发 TableNewRow 事件。Raises the TableNewRow event.

(继承自 DataTable)
ReadXml(Stream)

使用指定的 Stream 将 XML 架构和数据读入 DataTableReads XML schema and data into the DataTable using the specified Stream.

(继承自 DataTable)
ReadXml(String)

从指定的文件将 XML 架构和数据读入 DataTableReads XML schema and data into the DataTable from the specified file.

(继承自 DataTable)
ReadXml(TextReader)

使用指定的 TextReader 将 XML 架构和数据读入 DataTableReads XML schema and data into the DataTable using the specified TextReader.

(继承自 DataTable)
ReadXml(XmlReader)

使用指定的 XmlReader 将 XML 架构和数据读入 DataTableReads XML Schema and Data into the DataTable using the specified XmlReader.

(继承自 DataTable)
ReadXmlSchema(Stream)

使用指定的流将 XML 架构读入 DataTableReads an XML schema into the DataTable using the specified stream.

(继承自 DataTable)
ReadXmlSchema(String)

从指定的文件将 XML 架构读入 DataTableReads an XML schema into the DataTable from the specified file.

(继承自 DataTable)
ReadXmlSchema(TextReader)

使用指定的 TextReader 将 XML 架构读入 DataTableReads an XML schema into the DataTable using the specified TextReader.

(继承自 DataTable)
ReadXmlSchema(XmlReader)

使用指定的 XmlReader 将 XML 架构读入 DataTableReads an XML schema into the DataTable using the specified XmlReader.

(继承自 DataTable)
ReadXmlSerializable(XmlReader)

从 XML 流中读取。Reads from an XML stream.

(继承自 DataTable)
RejectChanges()

回滚自该表加载以来或上次调用 AcceptChanges() 以来对该表进行的所有更改。Rolls back all changes that have been made to the table since it was loaded, or the last time AcceptChanges() was called.

(继承自 DataTable)
Reset()

DataTable 重置为其初始状态。Resets the DataTable to its original state. 重置将移除表的所有数据、索引、关系和列。Reset removes all data, indexes, relations, and columns of the table. 如果数据集包含一个数据表,则在重置该表之后,它将仍是数据集的一部分。If a DataSet includes a DataTable, the table will still be part of the DataSet after the table is reset.

(继承自 DataTable)
Select()

获取由所有 DataRow 对象组成的数组。Gets an array of all DataRow objects.

(继承自 DataTable)
Select(String)

获取由与筛选条件匹配的所有 DataRow 对象组成的数组。Gets an array of all DataRow objects that match the filter criteria.

(继承自 DataTable)
Select(String, String)

以指定排序顺序,获取由与筛选条件匹配的所有 DataRow 对象组成的数组。Gets an array of all DataRow objects that match the filter criteria, in the specified sort order.

(继承自 DataTable)
Select(String, String, DataViewRowState)

以与指定状态匹配的排序顺序,获取由与筛选条件匹配的所有 DataRow 对象组成的数组。Gets an array of all DataRow objects that match the filter in the order of the sort that match the specified state.

(继承自 DataTable)
ToString()

获取 TableNameDisplayExpression(如果有一个用作连接字符串)。Gets the TableName and DisplayExpression, if there is one as a concatenated string.

(继承自 DataTable)
WriteXml(Stream)

通过指定的 Stream,按 XML 形式编写 DataTable 的当前内容。Writes the current contents of the DataTable as XML using the specified Stream.

(继承自 DataTable)
WriteXml(Stream, Boolean)

通过指定的 Stream,按 XML 形式编写 DataTable 的当前内容。Writes the current contents of the DataTable as XML using the specified Stream. 若要保存该表及其所有子代的数据,请将 writeHierarchy 参数设置为 trueTo save the data for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXml(Stream, XmlWriteMode)

使用指定的 XmlWriteModeDataTable 的当前数据和架构(可选)写入指定的文件。Writes the current data, and optionally the schema, for the DataTable to the specified file using the specified XmlWriteMode. 若要写入架构,请将 mode 参数的值设置为 WriteSchemaTo write the schema, set the value for the mode parameter to WriteSchema.

(继承自 DataTable)
WriteXml(Stream, XmlWriteMode, Boolean)

使用指定的 XmlWriteModeDataTable 的当前数据和架构(可选)写入指定的文件。Writes the current data, and optionally the schema, for the DataTable to the specified file using the specified XmlWriteMode. 若要写入架构,请将 mode 参数的值设置为 WriteSchemaTo write the schema, set the value for the mode parameter to WriteSchema. 若要保存该表及其所有子代的数据,请将 writeHierarchy 参数设置为 trueTo save the data for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXml(String)

使用指定的文件以 XML 形式写入 DataTable 的当前内容。Writes the current contents of the DataTable as XML using the specified file.

(继承自 DataTable)
WriteXml(String, Boolean)

使用指定的文件以 XML 形式写入 DataTable 的当前内容。Writes the current contents of the DataTable as XML using the specified file. 若要保存该表及其所有子代的数据,请将 writeHierarchy 参数设置为 trueTo save the data for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXml(String, XmlWriteMode)

使用指定的文件和 XmlWriteMode 写入 DataTable 的当前数据和架构(可选)。Writes the current data, and optionally the schema, for the DataTable using the specified file and XmlWriteMode. 若要写入架构,请将 mode 参数的值设置为 WriteSchemaTo write the schema, set the value for the mode parameter to WriteSchema.

(继承自 DataTable)
WriteXml(String, XmlWriteMode, Boolean)

使用指定的文件和 XmlWriteMode 写入 DataTable 的当前数据和架构(可选)。Writes the current data, and optionally the schema, for the DataTable using the specified file and XmlWriteMode. 若要写入架构,请将 mode 参数的值设置为 WriteSchemaTo write the schema, set the value for the mode parameter to WriteSchema. 若要保存该表及其所有子代的数据,请将 writeHierarchy 参数设置为 trueTo save the data for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXml(TextWriter)

通过指定的 TextWriter,按 XML 形式编写 DataTable 的当前内容。Writes the current contents of the DataTable as XML using the specified TextWriter.

(继承自 DataTable)
WriteXml(TextWriter, Boolean)

通过指定的 TextWriter,按 XML 形式编写 DataTable 的当前内容。Writes the current contents of the DataTable as XML using the specified TextWriter. 若要保存该表及其所有子代的数据,请将 writeHierarchy 参数设置为 trueTo save the data for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXml(TextWriter, XmlWriteMode)

使用指定的 TextWriterXmlWriteMode 写入 DataTable 的当前数据和架构(可选)。Writes the current data, and optionally the schema, for the DataTable using the specified TextWriter and XmlWriteMode. 若要写入架构,请将 mode 参数的值设置为 WriteSchemaTo write the schema, set the value for the mode parameter to WriteSchema.

(继承自 DataTable)
WriteXml(TextWriter, XmlWriteMode, Boolean)

使用指定的 TextWriterXmlWriteMode 写入 DataTable 的当前数据和架构(可选)。Writes the current data, and optionally the schema, for the DataTable using the specified TextWriter and XmlWriteMode. 若要写入架构,请将 mode 参数的值设置为 WriteSchemaTo write the schema, set the value for the mode parameter to WriteSchema. 若要保存该表及其所有子代的数据,请将 writeHierarchy 参数设置为 trueTo save the data for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXml(XmlWriter)

通过指定的 XmlWriter,按 XML 形式编写 DataTable 的当前内容。Writes the current contents of the DataTable as XML using the specified XmlWriter.

(继承自 DataTable)
WriteXml(XmlWriter, Boolean)

通过指定的 XmlWriter,按 XML 形式编写 DataTable 的当前内容。Writes the current contents of the DataTable as XML using the specified XmlWriter.

(继承自 DataTable)
WriteXml(XmlWriter, XmlWriteMode)

使用指定的 XmlWriterXmlWriteMode 写入 DataTable 的当前数据和架构(可选)。Writes the current data, and optionally the schema, for the DataTable using the specified XmlWriter and XmlWriteMode. 若要写入架构,请将 mode 参数的值设置为 WriteSchemaTo write the schema, set the value for the mode parameter to WriteSchema.

(继承自 DataTable)
WriteXml(XmlWriter, XmlWriteMode, Boolean)

使用指定的 XmlWriterXmlWriteMode 写入 DataTable 的当前数据和架构(可选)。Writes the current data, and optionally the schema, for the DataTable using the specified XmlWriter and XmlWriteMode. 若要写入架构,请将 mode 参数的值设置为 WriteSchemaTo write the schema, set the value for the mode parameter to WriteSchema. 若要保存该表及其所有子代的数据,请将 writeHierarchy 参数设置为 trueTo save the data for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXmlSchema(Stream)

以 XML 架构的形式将 DataTable 的当前数据结构写入指定的流。Writes the current data structure of the DataTable as an XML schema to the specified stream.

(继承自 DataTable)
WriteXmlSchema(Stream, Boolean)

以 XML 架构的形式将 DataTable 的当前数据结构写入指定的流。Writes the current data structure of the DataTable as an XML schema to the specified stream. 若要保存该表及其所有子代的架构,请将 writeHierarchy 参数设置为 trueTo save the schema for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXmlSchema(String)

以 XML 架构的形式将 DataTable 的当前数据结构写入指定的文件。Writes the current data structure of the DataTable as an XML schema to the specified file.

(继承自 DataTable)
WriteXmlSchema(String, Boolean)

以 XML 架构的形式将 DataTable 的当前数据结构写入指定的文件。Writes the current data structure of the DataTable as an XML schema to the specified file. 若要保存该表及其所有子代的架构,请将 writeHierarchy 参数设置为 trueTo save the schema for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXmlSchema(TextWriter)

使用指定的 TextWriter 以 XML 架构的形式写入 DataTable 的当前数据结构。Writes the current data structure of the DataTable as an XML schema using the specified TextWriter.

(继承自 DataTable)
WriteXmlSchema(TextWriter, Boolean)

使用指定的 TextWriter 以 XML 架构的形式写入 DataTable 的当前数据结构。Writes the current data structure of the DataTable as an XML schema using the specified TextWriter. 若要保存该表及其所有子代的架构,请将 writeHierarchy 参数设置为 trueTo save the schema for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)
WriteXmlSchema(XmlWriter)

使用指定的 XmlWriter 以 XML 架构的形式写入 DataTable 的当前数据结构。Writes the current data structure of the DataTable as an XML schema using the specified XmlWriter.

(继承自 DataTable)
WriteXmlSchema(XmlWriter, Boolean)

使用指定的 XmlWriter 以 XML 架构的形式写入 DataTable 的当前数据结构。Writes the current data structure of the DataTable as an XML schema using the specified XmlWriter. 若要保存该表及其所有子代的架构,请将 writeHierarchy 参数设置为 trueTo save the schema for the table and all its descendants, set the writeHierarchy parameter to true.

(继承自 DataTable)

事件

ColumnChanged

更改 DataRow 中指定的 DataColumn 值之后发生。Occurs after a value has been changed for the specified DataColumn in a DataRow.

(继承自 DataTable)
ColumnChanging

更改 DataRow 中指定的 DataColumn 值时发生。Occurs when a value is being changed for the specified DataColumn in a DataRow.

(继承自 DataTable)
Disposed

添加事件处理程序以侦听组件上的 Disposed 事件。Adds an event handler to listen to the Disposed event on the component.

(继承自 MarshalByValueComponent)
Initialized

初始化 DataTable 后发生。Occurs after the DataTable is initialized.

(继承自 DataTable)
RowChanged

在成功更改 DataRow 后发生。Occurs after a DataRow has been changed successfully.

(继承自 DataTable)
RowChanging

在更改 DataRow 时发生。Occurs when a DataRow is changing.

(继承自 DataTable)
RowDeleted

删除表中的行后发生。Occurs after a row in the table has been deleted.

(继承自 DataTable)
RowDeleting

要删除表中的行之前发生。Occurs before a row in the table is about to be deleted.

(继承自 DataTable)
TableCleared

清除 DataTable 后发生。Occurs after a DataTable is cleared.

(继承自 DataTable)
TableClearing

清除 DataTable 时发生。Occurs when a DataTable is cleared.

(继承自 DataTable)
TableNewRow

插入新的 DataRow 时发生。Occurs when a new DataRow is inserted.

(继承自 DataTable)

显式界面实现

IEnumerable.GetEnumerator()

返回类型化 DataRow 的枚举数。Returns an enumerator for the typed-DataRow. 此方法支持通过 Visual Studio 和 XSD.exe .NET Framework 工具生成类型化 DataTable 对象。This method supports typed-DataTable object generation by Visual Studio and the XSD.exe .NET Framework tool. 此方法不能直接在代码中使用。This method is not intended to be used directly from your code.

IListSource.ContainsListCollection

有关此成员的说明,请参见 ContainsListCollectionFor a description of this member, see ContainsListCollection.

(继承自 DataTable)
IListSource.GetList()

有关此成员的说明,请参见 GetList()For a description of this member, see GetList().

(继承自 DataTable)
ISerializable.GetObjectData(SerializationInfo, StreamingContext)

使用序列化 DataTable 时所需的数据填充序列化信息对象。Populates a serialization information object with the data needed to serialize the DataTable.

(继承自 DataTable)
IXmlSerializable.GetSchema()

有关此成员的说明,请参见 GetSchema()For a description of this member, see GetSchema().

(继承自 DataTable)
IXmlSerializable.ReadXml(XmlReader)

有关此成员的说明,请参见 ReadXml(XmlReader)For a description of this member, see ReadXml(XmlReader).

(继承自 DataTable)
IXmlSerializable.WriteXml(XmlWriter)

有关此成员的说明,请参见 WriteXml(XmlWriter)For a description of this member, see WriteXml(XmlWriter).

(继承自 DataTable)

扩展方法

CreateScope(IServiceProvider)

新建可用于解析作用域内服务的 IServiceScopeCreates a new IServiceScope that can be used to resolve scoped services.

GetRequiredService(IServiceProvider, Type)

IServiceProvider 获取类型 serviceType 的服务。Get service of type serviceType from the IServiceProvider.

GetRequiredService<T>(IServiceProvider)

IServiceProvider 获取类型 T 的服务。Get service of type T from the IServiceProvider.

GetService<T>(IServiceProvider)

IServiceProvider 获取类型 T 的服务。Get service of type T from the IServiceProvider.

GetServices(IServiceProvider, Type)

IServiceProvider 获取 serviceType 类型服务的枚举。Get an enumeration of services of type serviceType from the IServiceProvider.

GetServices<T>(IServiceProvider)

IServiceProvider 获取 T 类型服务的枚举。Get an enumeration of services of type T from the IServiceProvider.

AsDataView(DataTable)

创建并返回支持 LINQ 的 DataView 对象。Creates and returns a LINQ-enabled DataView object.

AsEnumerable(DataTable)

返回一个 IEnumerable<T> 对象,其泛型参数 TDataRowReturns an IEnumerable<T> object, where the generic parameter T is DataRow. 此对象可用在 LINQLINQ 表达式或方法查询中。This object can be used in a LINQLINQ expression or method query.

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于

另请参阅