DataRow.Table 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 행에 스키마가 있는 DataTable을 가져옵니다.
public:
property System::Data::DataTable ^ Table { System::Data::DataTable ^ get(); };
public System.Data.DataTable Table { get; }
member this.Table : System.Data.DataTable
Public ReadOnly Property Table As DataTable
속성 값
이 행이 속한 DataTable입니다.
예제
다음 예제에서는 속성을 사용하여 열 Table 컬렉션 DataTable에 대한 참조를 반환합니다.
private void GetTable(DataRow row)
{
// Get the DataTable of a DataRow
DataTable table = row.Table;
// Print the DataType of each column in the table.
foreach(DataColumn column in table.Columns)
{
Console.WriteLine(column.DataType);
}
}
Private Sub GetTable(ByVal row As DataRow)
' Get the DataTable of a DataRow
Dim table As DataTable = row.Table
' Print the DataType of each column in the table.
Dim column As DataColumn
For Each column in table.Columns
Console.WriteLine(column.DataType)
Next
End Sub
설명
A DataRow 가 반드시 테이블의 행 컬렉션에 속하지는 않습니다. 이 동작은 생성되었지만 에 추가되지 않은 경우에 DataRow DataRowCollection발생합니다. 속성이 RowState 반환 DataRowState.Detached되면 행이 컬렉션에 없습니다.