Skip to content

Commit cdf1b68

Browse files
committed
add: new method to write to the file from a list of lines
1 parent 0d80d06 commit cdf1b68

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Transaction/CreateFileTRA.cs

+7
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,11 @@ public static void WriteInFile(String path, string text)
4040
using StreamWriter sw = new StreamWriter(path);
4141
sw.Write(text);
4242
}
43+
44+
public static void WriteInFile(String path, IEnumerable<string> textLines)
45+
{
46+
using StreamWriter sw = new StreamWriter(path);
47+
foreach (var line in textLines)
48+
sw.WriteLine(line);
49+
}
4350
}

0 commit comments

Comments
 (0)