MappingType Enum
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
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. |
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
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.
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: