Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
100 レコードのデータテーブルがあり、ID に基づいて特定の 1 レコードを更新したいと考えています。
以下に例を示します。要件が明確でない場合でも役立つ場合があります。
DataRow row = tableWith100Rows.AsEnumerable() .FirstOrDefault(r => r.Field<int>("ID") == 4711); if(row != null) row.SetField("ColumnToUpdate", "new value");