Skip to content

Commit 0116ad5

Browse files
Update strmreader read2.cs (#8958)
1 parent 7342be3 commit 0116ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snippets/csharp/System.IO/StreamReader/Read/strmreader read2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void Main()
3232
while (sr.Peek() >= 0)
3333
{
3434
c = new char[5];
35-
sr.Read(c, 0, c.Length);
35+
sr.ReadBlock(c, 0, c.Length);
3636
//The output will look odd, because
3737
//only five characters are read at a time.
3838
Console.WriteLine(c);

0 commit comments

Comments
 (0)