DataColumn.Namespace 属性

定义

获取或设置 DataColumn 的命名空间。Gets or sets the namespace of the DataColumn.

public:
 property System::String ^ Namespace { System::String ^ get(); void set(System::String ^ value); };
public string Namespace { get; set; }
[System.Data.DataSysDescription("DataColumnNamespaceDescr")]
public string Namespace { get; set; }
member this.Namespace : string with get, set
[<System.Data.DataSysDescription("DataColumnNamespaceDescr")>]
member this.Namespace : string with get, set
Public Property Namespace As String

属性值

String

DataColumn 的命名空间。The namespace of the DataColumn.

属性

例外

该命名空间已有数据。The namespace already has data.

注解

Namespace DataTable DataSet 使用 ReadXmlWriteXmlReadXmlSchemaWriteXmlSchema 方法将 XML 文档读写到中的时,使用属性。The Namespace property is used when reading and writing an XML document into a DataTable in the DataSet using the ReadXml, WriteXml, ReadXmlSchema, or WriteXmlSchema methods.

XML 文档的命名空间用于在读入时确定 XML 特性和元素的作用域 DataSetThe namespace of an XML document is used to scope XML attributes and elements when read into a DataSet. 例如, DataSet 包含从具有命名空间 "myCompany" 的文档中读取的架构,并尝试使用 ReadXml) 从具有命名空间 "theirCompany" 的文档中的方法读取 (的数据。For example, a DataSet contains a schema read from a document that has the namespace "myCompany," and an attempt is made to read data (with the ReadXml method) from a document that has the namespace "theirCompany." 与现有架构不对应的任何数据都将被忽略。Any data that does not correspond to the existing schema will be ignored.

适用于

另请参阅