MappingType Enumeration


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Specifies how a DataColumn is mapped.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

public enum MappingType

Member nameDescription

The column is mapped to an XML attribute.


The column is mapped to an XML element.


The column is mapped to an internal structure.


The column is mapped to an XmlText node.

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.

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)

.NET Framework
Available since 1.1
Return to top