MappingType MappingType MappingType MappingType Enum

Definition

Specifies how a DataColumn is mapped.

public enum class MappingType
[Serializable]
public enum MappingType
type MappingType = 
Public Enum MappingType
Inheritance
Attributes
SerializableAttribute

Fields

Attribute Attribute Attribute Attribute 2

The column is mapped to an XML attribute.

Element Element Element Element 1

The column is mapped to an XML element.

Hidden Hidden Hidden Hidden 4

The column is mapped to an internal structure.

SimpleContent SimpleContent SimpleContent SimpleContent 3

The column is mapped to an XmlText node.

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.

Applies to