Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update strmreader read2.cs #8958

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <Snippet1>

Check failure on line 1 in snippets/csharp/System.IO/StreamReader/Read/strmreader read2.cs

View workflow job for this annotation

GitHub Actions / snippets-build

😵 Project missing. A project (and optionally a solution file) must be in this directory or one of the parent directories to validate and build this code.
using System;
using System.IO;

Expand Down Expand Up @@ -32,7 +32,7 @@
while (sr.Peek() >= 0)
{
c = new char[5];
sr.Read(c, 0, c.Length);
sr.ReadBlock(c, 0, c.Length);
//The output will look odd, because
//only five characters are read at a time.
Console.WriteLine(c);
Expand Down
Loading