OrdereredDictionary<K,V> and the KeyNotFoundException
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- documentation
Research direction
Open the generic OrderedDictionary<TKey,TValue> API page and its XML source at System.Collections.Generic/OrderedDictionary`2.xml. Read the indexer documentation and compare it with the non-generic OrderedDictionary behavior described in the issue. Done means the generic page clearly warns that a missing key throws KeyNotFoundException, while the non-generic version returns null.
Written by the indexing model from the issue text.
Description
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
Content source URL
Document Version Independent Id
fda90b9c-d6f5-e8a1-f381-46dd197f9890
Platform Id
59bdc0d2-f5e3-f0b9-0c27-d510734779b1
Article author
@dotnet-bot
- Dominant language
- C#
- Stars
- 950
- Forks
- 1.7k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 38
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/dotnet-api-docs
-
untriaged
Difficulty 1/5 Under an hour Newbie friendliness 88/100
dotnet/dotnet-api-docs#13039 · 1 comment ·
-
DisplayAttribute string properties: Remarks incorrectly state the property performs resource lookup Openarea-System.ComponentModel.DataAnnotations untriaged
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
dotnet/dotnet-api-docs#13023 · 1 comment ·
-
area-System.Net.Sockets untriaged
Difficulty 1/5 Under an hour Newbie friendliness 88/100
dotnet/dotnet-api-docs#13022 · 1 comment ·
-
area-System.Runtime untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dotnet/dotnet-api-docs#13015 · 1 comment ·
-
area-System.Runtime.InteropServices untriaged
Difficulty 1/5 Under an hour Newbie friendliness 84/100
dotnet/dotnet-api-docs#12959 ·
All issues in dotnet/dotnet-api-docs
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·