Export (0) Print
Expand All
Expand Minimize

MappingType Enumeration

Specifies how a DataColumn is mapped.

[Visual Basic]
<Serializable>
Public Enum MappingType
[C#]
[Serializable]
public enum MappingType
[C++]
[Serializable]
__value public enum MappingType
[JScript]
public
   Serializable
enum MappingType

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.

Members

Member name Description
Attribute

Supported by the .NET Compact Framework.

The column is mapped to an XML attribute.
Element

Supported by the .NET Compact Framework.

The column is mapped to an XML element.
Hidden

Supported by the .NET Compact Framework.

The column is mapped to an internal structure.
SimpleContent

Supported by the .NET Compact Framework.

The column is mapped to an XmlText node.

Example

[Visual Basic, C#, C++] The following example returns the ColumnMapping property value for each column in a table.

[Visual Basic] 
Private Sub GetColumnMapping(myTable As DataTable)
    Dim c As DataColumn
    For Each c In  myTable.Columns
        Console.WriteLine(c.ColumnMapping.ToString())
    Next c
End Sub

[C#] 
private void GetColumnMapping(DataTable myTable){
   foreach(DataColumn c in myTable.Columns){
      Console.WriteLine(c.ColumnMapping.ToString());
   } 
}

[C++] 
private:
 void GetColumnMapping(DataTable* myTable){
    System::Collections::IEnumerator* myEnum = myTable->Columns->GetEnumerator();
    while (myEnum->MoveNext())
    {
       DataColumn* c = __try_cast<DataColumn*>(myEnum->Current);
       Console::WriteLine(c->ColumnMapping);
    } 
 }

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Data

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

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

See Also

System.Data Namespace

Show:
© 2014 Microsoft