- C#, C♯, C#相談室 Part86 [転載禁止]©2ch.net
722 :デフォルトの名無しさん[sage]:2015/03/02(月) 09:37:46.96 ID:ixY25SIK - 次のプログラムがArgumentExceptionを出すのは何故でしょうか?
using (var ms = new MemoryStream()) { using (var sw = new StreamWriter(ms)) { sw.WriteLine("hello"); sw.WriteLine("world"); } using (var sr = new StreamReader(ms)) { Console.WriteLine(sr.ReadLine()); Console.WriteLine(sr.ReadLine()); } }
| - C#, C♯, C#相談室 Part86 [転載禁止]©2ch.net
725 :デフォルトの名無しさん[sage]:2015/03/02(月) 11:41:53.32 ID:ixY25SIK - >>723
writer閉じた後シークすらできなかったので ストリームが閉じているというのは納得です ありがとうございました
|
|