DataRow.Table プロパティとは? わかりやすく解説

DataRow.Table プロパティ

この行のスキーマ関連する DataTable を取得します

名前空間: System.Data
アセンブリ: System.Data (system.data.dll 内)
構文構文

Dim instance As DataRow
Dim value As DataTable

value = instance.Table
public DataTable Table { get; }
public:
property DataTable^ Table {
    DataTable^ get ();
}
/** @property */
public DataTable get_Table ()

プロパティ
この行が属すDataTable

解説解説
メモメモ

DataRow が必ずしもテーブルの行コレクション属しているとは限りません。この動作は、DataRow作成されていても DataRowCollection に追加されていない場合発生します。RowState プロパティDataRowState.Detached返した場合、この行はどのコレクションにも属していません。

使用例使用例

Table プロパティ使用してDataTable の列コレクション参照返す例を次に示します

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
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);
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataRow クラス
DataRow メンバ
System.Data 名前空間
DataColumnCollection クラス
DataTable



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DataRow.Table プロパティ」の関連用語

DataRow.Table プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataRow.Table プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS