// Configの読み込み
var config = ConfigurationManager.AppSettings;
// ファイルの読み込み
List<string> list = new List<string>();
using (StreamReader sr = new StreamReader(filepath))
{
while (sr.Peek() != -1)
{
list.Add(sr.ReadLine());
}
}
// ファイル書き込み
using (StreamWriter sw = new StreamWriter(filepath))
{
for (int i = 0; i < list.Count; i++)
{
sw.WriteLine(config.Get("AddFoward") + list[i] + config.Get("AddEnd"));
}
}