teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

コード追記しました

2021/05/26 01:48

投稿

ookura
ookura

スコア27

title CHANGED
File without changes
body CHANGED
@@ -22,6 +22,10 @@
22
22
  Encoding.GetEncoding("UTF-8"))) {
23
23
  String line;
24
24
  // using (TextReader sr = new StreamReaderをFile.readlinesに?
25
+ // 追記 line = File.ReadLines(fs); で変数lineにreadlinesの中身を格納しようと試したのですが
26
+ // 引数1はsystem.IO.FileStreamからstringに変換することはできませんとエラーがでます。
27
+ //
28
+
25
29
  // Read and display lines from the file until the end of
26
30
  // the file is reached.
27
31
  while ((line = sr.ReadLine()) != null) {