MappingType Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies how a DataColumn is mapped.
public enum class MappingType
public enum MappingType
[System.Serializable]
public enum MappingType
type MappingType =
[<System.Serializable>]
type MappingType =
Public Enum MappingType
- Inheritance
- Attributes
Fields
Name | Value | Description |
---|---|---|
Element | 1 | The column is mapped to an XML element. |
Attribute | 2 | The column is mapped to an XML attribute. |
SimpleContent | 3 | The column is mapped to an XmlText node. |
4 | The column is mapped to an internal structure. |
Examples
The following example returns the ColumnMapping property value for each column in a table.
static private void GetColumnMapping(DataTable dataTable)
{
foreach (DataColumn dataColumn in dataTable.Columns)
{
Console.WriteLine(dataColumn.ColumnMapping.ToString());
}
}
Private Sub GetColumnMapping(ByVal dataTable As DataTable)
Dim dataColumn As DataColumn
For Each dataColumn In dataTable.Columns
Console.WriteLine(dataColumn.ColumnMapping.ToString())
Next dataColumn
End Sub
Remarks
The MappingType enumeration is used when getting or setting the ColumnMapping property of the DataColumn. The property determines how a column's values will be written when the WriteXml method is called on a DataSet to write the data and schema out as an XML document.