DataTable 클래스

정의

메모리 내 데이터의 한 테이블을 나타냅니다.

public ref class DataTable : System::ComponentModel::MarshalByValueComponent, System::ComponentModel::IListSource, System::ComponentModel::ISupportInitialize, System::ComponentModel::ISupportInitializeNotification, System::Runtime::Serialization::ISerializable, System::Xml::Serialization::IXmlSerializable
public ref class DataTable
public ref class DataTable : System::ComponentModel::MarshalByValueComponent, System::ComponentModel::IListSource, System::ComponentModel::ISupportInitialize, System::Runtime::Serialization::ISerializable
public ref class DataTable : System::ComponentModel::MarshalByValueComponent, System::ComponentModel::IListSource, System::ComponentModel::ISupportInitializeNotification, System::Runtime::Serialization::ISerializable, System::Xml::Serialization::IXmlSerializable
public class DataTable : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitialize, System.ComponentModel.ISupportInitializeNotification, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
public class DataTable
[System.Serializable]
public class DataTable : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitialize, System.Runtime.Serialization.ISerializable
[System.Serializable]
public class DataTable : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitializeNotification, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
public class DataTable : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitializeNotification, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
type DataTable = class
    inherit MarshalByValueComponent
    interface IListSource
    interface ISupportInitialize
    interface ISupportInitializeNotification
    interface ISerializable
    interface IXmlSerializable
type DataTable = class
[<System.Serializable>]
type DataTable = class
    inherit MarshalByValueComponent
    interface IListSource
    interface ISupportInitialize
    interface ISerializable
[<System.Serializable>]
type DataTable = class
    inherit MarshalByValueComponent
    interface IListSource
    interface ISupportInitializeNotification
    interface ISupportInitialize
    interface ISerializable
    interface IXmlSerializable
Public Class DataTable
Inherits MarshalByValueComponent
Implements IListSource, ISerializable, ISupportInitialize, ISupportInitializeNotification, IXmlSerializable
Public Class DataTable
Public Class DataTable
Inherits MarshalByValueComponent
Implements IListSource, ISerializable, ISupportInitialize
Public Class DataTable
Inherits MarshalByValueComponent
Implements IListSource, ISerializable, ISupportInitializeNotification, IXmlSerializable
상속
상속
DataTable
파생
특성
구현

예제

다음 예제에서는 두 개의 DataTable 개체와 하나의 DataRelation 개체를 만들고 새 개체를 에 DataSet추가합니다. 그런 다음 테이블이 컨트롤에 DataGridView 표시됩니다.

// Put the next line into the Declarations section.
private System.Data.DataSet dataSet;

private void MakeDataTables()
{
    // Run all of the functions.
    MakeParentTable();
    MakeChildTable();
    MakeDataRelation();
    BindToDataGrid();
}

private void MakeParentTable()
{
    // Create a new DataTable.
    System.Data.DataTable table = new DataTable("ParentTable");
    // Declare variables for DataColumn and DataRow objects.
    DataColumn column;
    DataRow row;

    // Create new DataColumn, set DataType,
    // ColumnName and add to DataTable.
    column = new DataColumn();
    column.DataType = System.Type.GetType("System.Int32");
    column.ColumnName = "id";
    column.ReadOnly = true;
    column.Unique = true;
    // Add the Column to the DataColumnCollection.
    table.Columns.Add(column);

    // Create second column.
    column = new DataColumn();
    column.DataType = System.Type.GetType("System.String");
    column.ColumnName = "ParentItem";
    column.AutoIncrement = false;
    column.Caption = "ParentItem";
    column.ReadOnly = false;
    column.Unique = false;
    // Add the column to the table.
    table.Columns.Add(column);

    // Make the ID column the primary key column.
    DataColumn[] PrimaryKeyColumns = new DataColumn[1];
    PrimaryKeyColumns[0] = table.Columns["id"];
    table.PrimaryKey = PrimaryKeyColumns;

    // Instantiate the DataSet variable.
    dataSet = new DataSet();
    // Add the new DataTable to the DataSet.
    dataSet.Tables.Add(table);

    // Create three new DataRow objects and add
    // them to the DataTable
    for (int i = 0; i <= 2; i++)
    {
        row = table.NewRow();
        row["id"] = i;
        row["ParentItem"] = "ParentItem " + i;
        table.Rows.Add(row);
    }
}

private void MakeChildTable()
{
    // Create a new DataTable.
    DataTable table = new DataTable("childTable");
    DataColumn column;
    DataRow row;

    // Create first column and add to the DataTable.
    column = new DataColumn();
    column.DataType = System.Type.GetType("System.Int32");
    column.ColumnName = "ChildID";
    column.AutoIncrement = true;
    column.Caption = "ID";
    column.ReadOnly = true;
    column.Unique = true;

    // Add the column to the DataColumnCollection.
    table.Columns.Add(column);

    // Create second column.
    column = new DataColumn();
    column.DataType = System.Type.GetType("System.String");
    column.ColumnName = "ChildItem";
    column.AutoIncrement = false;
    column.Caption = "ChildItem";
    column.ReadOnly = false;
    column.Unique = false;
    table.Columns.Add(column);

    // Create third column.
    column = new DataColumn();
    column.DataType = System.Type.GetType("System.Int32");
    column.ColumnName = "ParentID";
    column.AutoIncrement = false;
    column.Caption = "ParentID";
    column.ReadOnly = false;
    column.Unique = false;
    table.Columns.Add(column);

    dataSet.Tables.Add(table);

    // Create three sets of DataRow objects,
    // five rows each, and add to DataTable.
    for (int i = 0; i <= 4; i++)
    {
        row = table.NewRow();
        row["childID"] = i;
        row["ChildItem"] = "Item " + i;
        row["ParentID"] = 0;
        table.Rows.Add(row);
    }
    for (int i = 0; i <= 4; i++)
    {
        row = table.NewRow();
        row["childID"] = i + 5;
        row["ChildItem"] = "Item " + i;
        row["ParentID"] = 1;
        table.Rows.Add(row);
    }
    for (int i = 0; i <= 4; i++)
    {
        row = table.NewRow();
        row["childID"] = i + 10;
        row["ChildItem"] = "Item " + i;
        row["ParentID"] = 2;
        table.Rows.Add(row);
    }
}

private void MakeDataRelation()
{
    // DataRelation requires two DataColumn
    // (parent and child) and a name.
    DataColumn parentColumn =
        dataSet.Tables["ParentTable"].Columns["id"];
    DataColumn childColumn =
        dataSet.Tables["ChildTable"].Columns["ParentID"];
    DataRelation relation = new
        DataRelation("parent2Child", parentColumn, childColumn);
    dataSet.Tables["ChildTable"].ParentRelations.Add(relation);
}

private void BindToDataGrid()
{
    // Instruct the DataGrid to bind to the DataSet, with the
    // ParentTable as the topmost DataTable.
    DataGrid1.SetDataBinding(dataSet, "ParentTable");
}
' Put the next line into the Declarations section.
private dataSet As DataSet 
 
Private Sub MakeDataTables()
    ' Run all of the functions. 
    MakeParentTable()
    MakeChildTable()
    MakeDataRelation()
    BindToDataGrid()
End Sub
 
Private Sub MakeParentTable()
    ' Create a new DataTable.
    Dim table As New DataTable("ParentTable")

    ' Declare variables for DataColumn and DataRow objects.
    Dim column As DataColumn 
    Dim row As DataRow 
 
    ' Create new DataColumn, set DataType, ColumnName 
    ' and add to DataTable.    
    column = New DataColumn()
    column.DataType = System.Type.GetType("System.Int32")
    column.ColumnName = "id"
    column.ReadOnly = True
    column.Unique = True

    ' Add the Column to the DataColumnCollection.
    table.Columns.Add(column)
 
    ' Create second column.
    column = New DataColumn()
    column.DataType = System.Type.GetType("System.String")
    column.ColumnName = "ParentItem"
    column.AutoIncrement = False
    column.Caption = "ParentItem"
    column.ReadOnly = False
    column.Unique = False

    ' Add the column to the table.
    table.Columns.Add(column)
 
    ' Make the ID column the primary key column.
    Dim PrimaryKeyColumns(0) As DataColumn
    PrimaryKeyColumns(0)= table.Columns("id")
    table.PrimaryKey = PrimaryKeyColumns
 
    ' Instantiate the DataSet variable.
    dataSet = New DataSet()

    ' Add the new DataTable to the DataSet.
    dataSet.Tables.Add(table)
 
    ' Create three new DataRow objects and add 
    ' them to the DataTable
    Dim i As Integer
    For i = 0 to 2
       row = table.NewRow()
       row("id") = i
       row("ParentItem") = "ParentItem " + i.ToString()
       table.Rows.Add(row)
    Next i
End Sub
 
Private Sub MakeChildTable()
    ' Create a new DataTable.
    Dim table As New DataTable("childTable")
    Dim column As DataColumn 
    Dim row As DataRow 
 
    ' Create first column and add to the DataTable.
    column = New DataColumn()
    column.DataType= System.Type.GetType("System.Int32")
    column.ColumnName = "ChildID"
    column.AutoIncrement = True
    column.Caption = "ID"
    column.ReadOnly = True
    column.Unique = True

    ' Add the column to the DataColumnCollection.
    table.Columns.Add(column)
 
    ' Create second column.
    column = New DataColumn()
    column.DataType= System.Type.GetType("System.String")
    column.ColumnName = "ChildItem"
    column.AutoIncrement = False
    column.Caption = "ChildItem"
    column.ReadOnly = False
    column.Unique = False
    table.Columns.Add(column)
 
    ' Create third column.
    column = New DataColumn()
    column.DataType= System.Type.GetType("System.Int32")
    column.ColumnName = "ParentID"
    column.AutoIncrement = False
    column.Caption = "ParentID"
    column.ReadOnly = False
    column.Unique = False
    table.Columns.Add(column)
 
    dataSet.Tables.Add(table)

    ' Create three sets of DataRow objects, five rows each, 
    ' and add to DataTable.
    Dim i As Integer
    For i = 0 to 4
       row = table.NewRow()
       row("childID") = i
       row("ChildItem") = "Item " + i.ToString()
       row("ParentID") = 0 
       table.Rows.Add(row)
    Next i
    For i = 0 to 4
       row = table.NewRow()
       row("childID") = i + 5
       row("ChildItem") = "Item " + i.ToString()
       row("ParentID") = 1 
       table.Rows.Add(row)
    Next i
    For i = 0 to 4
       row = table.NewRow()
       row("childID") = i + 10
       row("ChildItem") = "Item " + i.ToString()
       row("ParentID") = 2 
       table.Rows.Add(row)
    Next i
End Sub
 
Private Sub MakeDataRelation()
    ' DataRelation requires two DataColumn 
    ' (parent and child) and a name.
    Dim parentColumn As DataColumn = _
        dataSet.Tables("ParentTable").Columns("id")
    Dim childColumn As DataColumn = _
        dataSet.Tables("ChildTable").Columns("ParentID")
    Dim relation As DataRelation = new _
        DataRelation("parent2Child", parentColumn, childColumn)
    dataSet.Tables("ChildTable").ParentRelations.Add(relation)
End Sub
 
Private Sub BindToDataGrid()
    ' Instruct the DataGrid to bind to the DataSet, with the 
    ' ParentTable as the topmost DataTable.
    DataGrid1.SetDataBinding(dataSet,"ParentTable")
End Sub

설명

이 API에 대한 자세한 내용은 DataTable에 대한 추가 API 설명을 참조하세요.

생성자

DataTable()

인수를 사용하지 않고 DataTable 클래스의 새 인스턴스를 초기화합니다.

DataTable(SerializationInfo, StreamingContext)
사용되지 않음.

serialize된 데이터를 사용하여 DataTable 클래스의 새 인스턴스를 초기화합니다.

DataTable(String)

지정된 테이블 이름을 사용하여 DataTable 클래스의 새 인스턴스를 초기화합니다.

DataTable(String, String)

지정된 테이블 이름과 네임스페이스를 사용하여 DataTable 클래스의 새 인스턴스를 초기화합니다.

필드

fInitInProgress

초기화가 진행 중인지 여부를 확인합니다. 초기화는 런타임에 발생합니다.

속성

CaseSensitive

테이블 내의 문자열을 비교할 때 대/소문자를 구분할지 여부를 나타냅니다.

ChildRelations

DataTable에 대한 자식 관계 컬렉션을 가져옵니다.

Columns

이 테이블에 속한 열의 컬렉션을 가져옵니다.

Constraints

이 테이블이 유지하는 제약 조건의 컬렉션을 가져옵니다.

Container

구성 요소의 컨테이너를 가져옵니다.

(다음에서 상속됨 MarshalByValueComponent)
DataSet

이 테이블이 속한 DataSet을 가져옵니다.

DefaultView

필터링된 뷰를 포함할 수 있는 테이블의 사용자 지정 뷰 또는 커서 위치를 가져옵니다.

DesignMode

구성 요소가 현재 디자인 모드에 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 MarshalByValueComponent)
DisplayExpression

이 테이블을 사용자 인터페이스에 나타내는 데 사용되는 값을 반환하는 식을 가져오거나 설정합니다. DisplayExpression 속성을 사용하여 이 테이블의 이름을 사용자 인터페이스에 표시할 수 있습니다.

Events

이 구성 요소에 연결된 이벤트 처리기의 목록을 가져옵니다.

(다음에서 상속됨 MarshalByValueComponent)
ExtendedProperties

사용자 지정 사용자 정보 컬렉션을 가져옵니다.

HasErrors

해당 테이블이 속하는 DataSet의 테이블에 있는 행에 오류가 있는지 여부를 나타내는 값을 가져옵니다.

IsInitialized

DataTable이 초기화되어 있는지 여부를 나타내는 값을 가져옵니다.

Locale

테이블 내의 문자열을 비교하는 데 사용되는 로캘 정보를 가져오거나 설정합니다.

MinimumCapacity

이 테이블에 대한 초기 시작 크기를 가져오거나 설정합니다.

Namespace

DataTable에 저장된 데이터의 XML 표현에 대한 네임스페이스를 가져오거나 설정합니다.

ParentRelations

DataTable에 대한 부모 관계 컬렉션을 가져옵니다.

Prefix

DataTable에 저장된 데이터의 XML 표현에 대한 네임스페이스를 가져오거나 설정합니다.

PrimaryKey

데이터 테이블에 대한 기본 키로 사용되는 열의 배열을 가져오거나 설정합니다.

RemotingFormat

serialization 형식을 가져오거나 설정합니다.

Rows

이 테이블에 속한 행의 컬렉션을 가져옵니다.

Site

ISite에 대한 DataTable를 가져오거나 설정합니다.

TableName

DataTable의 이름을 가져오거나 설정합니다.

메서드

AcceptChanges()

AcceptChanges()가 마지막으로 호출된 이후 이 테이블에서 변경된 내용을 모두 커밋합니다.

BeginInit()

폼에 사용되거나 다른 구성 요소에서 사용하는 DataTable의 초기화를 시작합니다. 초기화는 런타임에 발생합니다.

BeginLoadData()

데이터를 로드하는 동안 알림, 인덱스 유지 관리 및 제약 조건 기능을 해제합니다.

Clear()

DataTable의 모든 데이터를 지웁니다.

Clone()

모든 DataTable 스키마, 관계 및 제약 조건을 포함하여 DataTable의 구조를 복제합니다.

Compute(String, String)

필터 조건을 전달하는 현재 행에서 지정된 식을 계산합니다.

Copy()

DataTable의 구조와 데이터를 모두 복사합니다.

CreateDataReader()

DataTableReader의 데이터에 해당하는 DataTable를 반환합니다.

CreateInstance()

DataTable의 새 인스턴스를 만듭니다.

Dispose()

MarshalByValueComponent에서 사용하는 모든 리소스를 해제합니다.

(다음에서 상속됨 MarshalByValueComponent)
Dispose(Boolean)

MarshalByValueComponent에서 사용하는 관리되지 않는 리소스를 해제하고, 관리되는 리소스를 선택적으로 해제할 수 있습니다.

(다음에서 상속됨 MarshalByValueComponent)
EndInit()

폼에 사용되거나 다른 구성 요소에서 사용하는 DataTable의 초기화를 끝냅니다. 초기화는 런타임에 발생합니다.

EndLoadData()

데이터를 로드한 후 알림, 인덱스 유지 관리 및 제약 조건 기능을 설정합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetChanges()

로드되거나 DataTable가 마지막으로 호출된 후에 변경된 내용이 모두 들어 있는 AcceptChanges()의 복사본을 가져옵니다.

GetChanges(DataRowState)

마지막으로 로드되거나 DataTable가 호출된 후에 변경되어 AcceptChanges()를 기준으로 필터링된 내용이 모두 들어 있는 DataRowState의 복사본을 가져옵니다.

GetDataTableSchema(XmlSchemaSet)

이 메서드는 웹 서비스의 XmlSchemaSet을 설명하는 WSDL(Web Services Description Language)이 포함된 DataTable 인스턴스를 반환합니다.

GetErrors()

오류가 있는 DataRow 개체로 이루어진 배열을 가져옵니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetObjectData(SerializationInfo, StreamingContext)
사용되지 않음.

DataTable을 serialize하는 데 필요한 데이터로 serialization 정보 개체를 채웁니다.

GetRowType()

행 형식을 가져옵니다.

GetSchema()

이 멤버에 대한 설명은 GetSchema()를 참조하세요.

GetService(Type)

IServiceProvider의 구현자를 가져옵니다.

(다음에서 상속됨 MarshalByValueComponent)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
ImportRow(DataRow)

원래 값 및 현재 값과 모든 속성 설정을 그대로 유지한 상태로 DataRowDataTable에 복사합니다.

Load(IDataReader)

제공된 DataTable를 사용해서 IDataReader을 데이터 소스의 값으로 채웁니다. DataTable에 이미 행이 포함되어 있으면 데이터 소스에서 들어오는 데이터가 기존 행과 병합됩니다.

Load(IDataReader, LoadOption)

제공된 DataTable를 사용해서 IDataReader을 데이터 소스의 값으로 채웁니다. DataTable에 이미 행이 포함되어 있으면 데이터 소스에서 들어오는 데이터는 loadOption 매개 변수의 값에 따라 기존 행과 병합됩니다.

Load(IDataReader, LoadOption, FillErrorEventHandler)

오류 처리 대리자를 사용하는 제공된 DataTable를 사용해서 IDataReader을 데이터 소스의 값으로 채웁니다.

LoadDataRow(Object[], Boolean)

특정 행을 찾아 업데이트합니다. 일치하는 행을 찾지 못하면 지정된 값을 사용하여 새 행을 만듭니다.

LoadDataRow(Object[], LoadOption)

특정 행을 찾아 업데이트합니다. 일치하는 행을 찾지 못하면 지정된 값을 사용하여 새 행을 만듭니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
Merge(DataTable)

지정된 DataTable을 현재 DataTable과 병합합니다.

Merge(DataTable, Boolean)

지정된 DataTable을 현재 DataTable과 병합하여 현재 DataTable에서 변경 내용을 유지할지 여부를 나타냅니다.

Merge(DataTable, Boolean, MissingSchemaAction)

지정된 DataTable을 현재 DataTable과 병합하여, 변경 내용을 유지할지 여부와 현재 DataTable의 누락된 스키마 처리 방식을 나타냅니다.

NewRow()

테이블과 동일한 스키마를 갖는 새 DataRow를 만듭니다.

NewRowArray(Int32)

DataRow의 배열을 반환합니다.

NewRowFromBuilder(DataRowBuilder)

기존 행에서 새 행을 만듭니다.

OnColumnChanged(DataColumnChangeEventArgs)

ColumnChanged 이벤트를 발생시킵니다.

OnColumnChanging(DataColumnChangeEventArgs)

ColumnChanging 이벤트를 발생시킵니다.

OnPropertyChanging(PropertyChangedEventArgs)

PropertyChanged 이벤트를 발생시킵니다.

OnRemoveColumn(DataColumn)

DataTable이 제거 중임을 DataColumn에 알립니다.

OnRowChanged(DataRowChangeEventArgs)

RowChanged 이벤트를 발생시킵니다.

OnRowChanging(DataRowChangeEventArgs)

RowChanging 이벤트를 발생시킵니다.

OnRowDeleted(DataRowChangeEventArgs)

RowDeleted 이벤트를 발생시킵니다.

OnRowDeleting(DataRowChangeEventArgs)

RowDeleting 이벤트를 발생시킵니다.

OnTableCleared(DataTableClearEventArgs)

TableCleared 이벤트를 발생시킵니다.

OnTableClearing(DataTableClearEventArgs)

TableClearing 이벤트를 발생시킵니다.

OnTableNewRow(DataTableNewRowEventArgs)

TableNewRow 이벤트를 발생시킵니다.

ReadXml(Stream)

지정된 DataTable를 사용하여 XML 스키마와 데이터를 Stream으로 읽어옵니다.

ReadXml(String)

지정된 파일로부터 XML 스키마와 데이터를 DataTable로 읽어옵니다.

ReadXml(TextReader)

지정된 DataTable를 사용하여 XML 스키마와 데이터를 TextReader으로 읽어옵니다.

ReadXml(XmlReader)

지정된 DataTable를 사용하여 XML 스키마와 데이터를 XmlReader로 읽어옵니다.

ReadXmlSchema(Stream)

지정된 스트림을 사용하여 XML 스키마를 DataTable로 읽어옵니다.

ReadXmlSchema(String)

지정된 파일로부터 XML 스키마를 DataTable로 읽어옵니다.

ReadXmlSchema(TextReader)

지정된 DataTable를 사용하여 XML 스키마를 TextReader로 읽어옵니다.

ReadXmlSchema(XmlReader)

지정된 DataTable를 사용하여 XML 스키마를 XmlReader로 읽어옵니다.

ReadXmlSerializable(XmlReader)

XML 스트림에서 읽습니다.

RejectChanges()

테이블이 로드된 이후 또는 AcceptChanges()가 마지막으로 호출된 이후에 변경된 내용을 모두 롤백합니다.

Reset()

DataTable을 원래 상태로 다시 설정합니다. 다시 설정은 테이블의 모든 데이터, 인덱스, 관계 및 열을 제거합니다. DataSet에 DataTable이 포함된 경우 테이블을 다시 설정한 후 테이블은 DataSet의 일부가 됩니다.

Select()

모든 DataRow 개체의 배열을 가져옵니다.

Select(String)

필터 조건에 맞는 모든 DataRow 개체의 배열을 가져옵니다.

Select(String, String)

필터 조건에 맞는 모든 DataRow 개체의 배열을 지정된 정렬 순서대로 가져옵니다.

Select(String, String, DataViewRowState)

필터와 일치하는 모든 DataRow 개체의 배열을 지정된 상태와 일치하는 정렬 순서대로 가져옵니다.

ToString()

연결된 문자열이 있는 경우 TableNameDisplayExpression을 가져옵니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
WriteXml(Stream)

지정된 Stream를 사용하여 DataTable의 현재 콘텐츠를 XML로 작성합니다.

WriteXml(Stream, Boolean)

지정된 Stream를 사용하여 DataTable의 현재 콘텐츠를 XML로 작성합니다. 테이블과 모든 하위 항목의 데이터를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXml(Stream, XmlWriteMode)

지정된 DataTable를 사용하여 지정된 파일에 XmlWriteMode의 현재 데이터를 쓰고 선택적으로 스키마를 씁니다. 스키마를 쓰려면 mode 매개 변수 값을 WriteSchema로 설정합니다.

WriteXml(Stream, XmlWriteMode, Boolean)

지정된 DataTable를 사용하여 지정된 파일에 XmlWriteMode의 현재 데이터를 쓰고 선택적으로 스키마를 씁니다. 스키마를 쓰려면 mode 매개 변수 값을 WriteSchema로 설정합니다. 테이블과 모든 하위 항목의 데이터를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXml(String)

지정된 파일을 사용하여 DataTable의 현재 내용을 XML로 씁니다.

WriteXml(String, Boolean)

지정된 파일을 사용하여 DataTable의 현재 내용을 XML로 씁니다. 테이블과 모든 하위 항목의 데이터를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXml(String, XmlWriteMode)

지정된 파일과 DataTable를 사용하여 XmlWriteMode에 대해 현재 데이터를 쓰고 선택적으로 스키마를 씁니다. 스키마를 쓰려면 mode 매개 변수 값을 WriteSchema로 설정합니다.

WriteXml(String, XmlWriteMode, Boolean)

지정된 파일과 DataTable를 사용하여 XmlWriteMode에 대해 현재 데이터를 쓰고 선택적으로 스키마를 씁니다. 스키마를 쓰려면 mode 매개 변수 값을 WriteSchema로 설정합니다. 테이블과 모든 하위 항목의 데이터를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXml(TextWriter)

지정된 TextWriter를 사용하여 DataTable의 현재 콘텐츠를 XML로 작성합니다.

WriteXml(TextWriter, Boolean)

지정된 TextWriter를 사용하여 DataTable의 현재 콘텐츠를 XML로 작성합니다. 테이블과 모든 하위 항목의 데이터를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXml(TextWriter, XmlWriteMode)

지정된 DataTableTextWriter를 사용하여 XmlWriteMode의 현재 데이터를 쓰고 선택적으로 스키마를 씁니다. 스키마를 쓰려면 mode 매개 변수 값을 WriteSchema로 설정합니다.

WriteXml(TextWriter, XmlWriteMode, Boolean)

지정된 DataTableTextWriter를 사용하여 XmlWriteMode의 현재 데이터를 쓰고 선택적으로 스키마를 씁니다. 스키마를 쓰려면 mode 매개 변수 값을 WriteSchema로 설정합니다. 테이블과 모든 하위 항목의 데이터를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXml(XmlWriter)

지정된 XmlWriter를 사용하여 DataTable의 현재 콘텐츠를 XML로 작성합니다.

WriteXml(XmlWriter, Boolean)

지정된 XmlWriter를 사용하여 DataTable의 현재 콘텐츠를 XML로 작성합니다.

WriteXml(XmlWriter, XmlWriteMode)

지정된 DataTableXmlWriter를 사용하여 XmlWriteMode의 현재 데이터를 쓰고 선택적으로 스키마를 씁니다. 스키마를 쓰려면 mode 매개 변수 값을 WriteSchema로 설정합니다.

WriteXml(XmlWriter, XmlWriteMode, Boolean)

지정된 DataTableXmlWriter를 사용하여 XmlWriteMode의 현재 데이터를 쓰고 선택적으로 스키마를 씁니다. 스키마를 쓰려면 mode 매개 변수 값을 WriteSchema로 설정합니다. 테이블과 모든 하위 항목의 데이터를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXmlSchema(Stream)

DataTable의 현재 데이터 구조를 지정된 스트림에 XMl 스키마로 씁니다.

WriteXmlSchema(Stream, Boolean)

DataTable의 현재 데이터 구조를 지정된 스트림에 XMl 스키마로 씁니다. 테이블과 모든 하위 항목의 스키마를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXmlSchema(String)

DataTable의 현재 데이터 구조를 지정된 파일에 XML 스키마로 씁니다.

WriteXmlSchema(String, Boolean)

DataTable의 현재 데이터 구조를 지정된 파일에 XML 스키마로 씁니다. 테이블과 모든 하위 항목의 스키마를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXmlSchema(TextWriter)

지정된 DataTable를 사용하여 TextWriter의 현재 데이터 구조를 XML 스키마로 씁니다.

WriteXmlSchema(TextWriter, Boolean)

지정된 DataTable를 사용하여 TextWriter의 현재 데이터 구조를 XML 스키마로 씁니다. 테이블과 모든 하위 항목의 스키마를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

WriteXmlSchema(XmlWriter)

지정된 DataTable를 사용하여 XmlWriter의 현재 데이터 구조를 XML 스키마로 씁니다.

WriteXmlSchema(XmlWriter, Boolean)

지정된 DataTable를 사용하여 XmlWriter의 현재 데이터 구조를 XML 스키마로 씁니다. 테이블과 모든 하위 항목의 스키마를 저장하려면 writeHierarchy 매개 변수를 true로 설정합니다.

이벤트

ColumnChanged

DataColumn에 있는 지정된 DataRow의 값이 변경된 후 발생합니다.

ColumnChanging

DataColumn에 있는 지정된 DataRow의 값이 변경될 때 발생합니다.

Disposed

구성 요소의 Disposed 이벤트를 수신할 이벤트 처리기를 추가합니다.

(다음에서 상속됨 MarshalByValueComponent)
Initialized

DataTable이 초기화된 후 발생합니다.

RowChanged

DataRow가 변경된 후에 발생합니다.

RowChanging

DataRow가 변경될 때 발생합니다.

RowDeleted

테이블의 행이 삭제된 후 발생합니다.

RowDeleting

테이블의 행이 삭제되기 직전에 발생합니다.

TableCleared

DataTable이 지워진 다음 발생합니다.

TableClearing

DataTable이 지워질 때 발생합니다.

TableNewRow

DataRow가 삽입될 때 발생합니다.

명시적 인터페이스 구현

IListSource.ContainsListCollection

이 멤버에 대한 설명은 ContainsListCollection를 참조하세요.

IListSource.GetList()

이 멤버에 대한 설명은 GetList()를 참조하세요.

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

DataTable을 serialize하는 데 필요한 데이터로 serialization 정보 개체를 채웁니다.

IXmlSerializable.GetSchema()

이 멤버에 대한 설명은 GetSchema()를 참조하세요.

IXmlSerializable.ReadXml(XmlReader)

이 멤버에 대한 설명은 ReadXml(XmlReader)를 참조하세요.

IXmlSerializable.WriteXml(XmlWriter)

이 멤버에 대한 설명은 WriteXml(XmlWriter)를 참조하세요.

확장 메서드

AsDataView(DataTable)

LINQ 사용 DataView 개체를 만들어 반환합니다.

AsEnumerable(DataTable)

IEnumerable<T> 개체를 반환하며, 제네릭 매개 변수 TDataRow입니다. 이 개체는 LINQ 식 또는 메서드 쿼리에서 사용할 수 있습니다.

적용 대상

스레드 보안

이 형식은 다중 스레드 읽기 작업에 안전합니다. 모든 쓰기 작업을 동기화해야 합니다.

추가 정보