【发布时间】:2017-12-04 23:08:33
【问题描述】:
我正在尝试编写一个将一组字符串添加到 CSV 文件的 C# 方法。会是这样,
public void StoreWords(string expectedValue, stringActualValue)
{
///Store expectedValue, actualValue, and a seed value per row in the
/// .csv file. If the combination of the expectValue and actualValue
///does not exist in the .csv file, then initialize a seed value for that
///combination, otherwise increment the seed value for that combination
}
我无法打开 csv 文件并存储单词组合。任何帮助将不胜感激。
【问题讨论】:
-
问题太宽泛(问题不止一个……)。首先搜索“如何在 C# 中读取文件”。然后搜索“如何在 c# 中追加到文件”。也许是“如何在 c# 中解析 csv 文件”。然后尝试你学到的东西,如果你遇到困难,再回来提出一个具体的问题。