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.
次のコードがあります
csvWriter.WriteField<string>(row.Field<string>(column.ColumnName));
row.Field が int 型のデータに遭遇すると、エラーが発生します。
これを回避する方法はありますか?この場合、データを int から文字列にキャストするにはどうすればよいですか。
次のようなものを試してみることをお勧めします...
csvWriter.WriteField<string>(row.Field<int>(column.ColumnName).ToString());
int...列の値を取得する必要がある場合。
int