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

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataRowCollection.Item プロパティの意味・解説 

DataRowCollection.Item プロパティ

指定したインデックス位置にある行を取得します

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

Dim instance As DataRowCollection
Dim index As Integer
Dim value As DataRow

value = instance(index)
public DataRow this [
    int index
] { get; }
public:
property DataRow^ default [int] {
    DataRow^ get (int index);
}
/** @property */
public DataRow get_Item (int index)

パラメータ

index

返す行の 0 から始まるインデックス番号

プロパティ
指定した DataRow。

例外例外
例外種類条件

IndexOutOfRangeException

インデックス値が、コレクション内の項目数超える値です。

解説解説
使用例使用例

DataRowCollection 内の各行の列 1 の値を出力する例を次に示します

Private Sub PrintRows(table As
 DataTable)
     ' Print the first column for every row using the index.
     Dim i As Integer
     For i = 0 To table.Rows.Count - 1
         Console.WriteLine(table.Rows(i)(0))
     Next i
End Sub
private void PrintRows(DataTable table)
{
    // Print the CompanyName column for every row using the index.
    for(int i = 0; i < table.Rows.Count;
 i++)
    {
        Console.WriteLine(table.Rows[i]["CompanyName"]);
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataRowCollection クラス
DataRowCollection メンバ
System.Data 名前空間
Contains


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataRowCollection.Item プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataRowCollection.Item プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataRowCollection.Item プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS