-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-System.Databreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.Issue or PR that represents a breaking API or functional change over a previous release.bug
Milestone
Description
The buffer parameter of GetBytes/GetChars should be annotated to allow null values. Currently in .NET 5.0.0 they are annotated to not allow null values (see #38810).
The documentation states:
If you pass a buffer that is
null,GetCharsreturns the length of the field in characters.
Source: https://docs.microsoft.com/en-us/dotnet/api/system.data.idatarecord.getchars?view=net-5.0#remarks
In SqlClient the implementation does indeed conform to the documentation: https://github.com/dotnet/SqlClient/blob/f0572f3e9990b391d6102911fe12223e748e117b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataReader.cs#L1663
Metadata
Metadata
Assignees
Labels
area-System.Databreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.Issue or PR that represents a breaking API or functional change over a previous release.bug