Type of issue
Missing information
Description
It would be nice if the subtle difference between the indexers for the non-generic and generic OrderedDictionary classes was called out as something to be aware of.
In the non-generic version, the indexer returns null if the key isn't found.
In the generic version, the KeyNotFoundException is thrown if the key isn't found.
This subtlety bit us today as we recently updated the non-generic version to the generic version.
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ordereddictionary-2.item?view=net-10.0
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Collections.Generic/OrderedDictionary`2.xml
Document Version Independent Id
fda90b9c-d6f5-e8a1-f381-46dd197f9890
Platform Id
59bdc0d2-f5e3-f0b9-0c27-d510734779b1
Article author
@dotnet-bot
Type of issue
Missing information
Description
It would be nice if the subtle difference between the indexers for the non-generic and generic OrderedDictionary classes was called out as something to be aware of.
In the non-generic version, the indexer returns null if the key isn't found.
In the generic version, the KeyNotFoundException is thrown if the key isn't found.
This subtlety bit us today as we recently updated the non-generic version to the generic version.
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ordereddictionary-2.item?view=net-10.0
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Collections.Generic/OrderedDictionary`2.xml
Document Version Independent Id
fda90b9c-d6f5-e8a1-f381-46dd197f9890
Platform Id
59bdc0d2-f5e3-f0b9-0c27-d510734779b1
Article author
@dotnet-bot