回答編集履歴
1
FileStream に変更
answer
CHANGED
@@ -6,4 +6,16 @@
|
|
6
6
|
String line = sr.ReadToEnd();
|
7
7
|
ファイル出力();
|
8
8
|
}
|
9
|
+
```
|
10
|
+
失礼しました。これでどうでしょうか?
|
11
|
+
|
12
|
+
```
|
13
|
+
using (FileStream fs = new FileStream("log.txt", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
14
|
+
{
|
15
|
+
using (TextReader sr = new StreamReader(fs, Encoding.GetEncoding("shift-jis")))
|
16
|
+
{
|
17
|
+
String line = sr.ReadToEnd();
|
18
|
+
ファイル出力();
|
19
|
+
}
|
20
|
+
}
|
9
21
|
```
|