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