dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

Incorrect explanation of missing key behaviour in DbConnectionStringBuilder indexer

Open aidy-jenkins opened this issue 1 year ago • 1 comments

Type of issue

Other (describe below)

Description

In the documentation for DbConnectionBuilder indexer, it specifies that "If the specified key is not found, trying to get it returns a null reference"

however, this seems to be inaccurate. if the key is not found it throws an ArgumentException as can be seen in the source here: https://github.com/dotnet/runtime/blob/5535e31a712343a63f5d7d796cd874e563e5ac14/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.data.common.dbconnectionstringbuilder.item?view=net-8.0#system-data-common-dbconnectionstringbuilder-item(system-string)

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Data.Common/DbConnectionStringBuilder.xml

Document Version Independent Id

d3e2ea09-1996-0448-02bb-dc5af146065d

Article author

@dotnet-bot

aidy-jenkins avatar Sep 20 '24 09:09 aidy-jenkins

@aidy-jenkins that seems right, are you interested in submitting a PR to fix this?

roji avatar Sep 24 '24 08:09 roji

Apologies, I was away after raising the issue.

Sure I'll take a look.

aidy-jenkins avatar Oct 01 '24 22:10 aidy-jenkins