-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[API Proposal]: BinaryReader.ReadExactly #101614
Copy link
Copy link
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.IOgood first issueIssue should be easy to implement, good for first-time contributorsIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.IOgood first issueIssue should be easy to implement, good for first-time contributorsIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Type
Fields
Give feedbackNo fields configured for issues without a type.
Background and motivation
When reading custom binary formats one very often needs a specific number of bytes. The existing
Read()method doesn't read a specific number of bytes, it reads as many bytes are currently available. Calling code has to handle this.We had the same issue on
Streamand solved this by exposingStream.ReadExactlyandStream.ReadAtLeast.API Proposal
API Usage
Alternative Designs
No response
Risks
No response