© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
morry329#

❔ System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary

I have a code which was supposed to read csv data and return the content of columns (like "braun," "ja" etc, please see the screenshot) - once I run the code and enter any value that exists on .csv, I get KeyNotFoundException.
Here is my driver code https://github.com/morry239/HashTableRedBook/blob/master/ZIPCodeSearch/ZIPCodeSearch.cs
And the Main https://github.com/morry239/HashTableRedBook/blob/master/ZIPCodeSearch/Program.cs
Could anyone kindly point me in the right direction? I have no idea why the key does not 'exist' in there.
Bildschirmfoto_2023-03-09_um_21.38.03.png
GitHub
HashTableRedBook/ZIPCodeSearch.cs at master · morry239/HashTableRed...
Contribute to morry239/HashTableRedBook development by creating an account on GitHub.
HashTableRedBook/ZIPCodeSearch.cs at master · morry239/HashTableRed...
GitHub
HashTableRedBook/Program.cs at master · morry239/HashTableRedBook
Contribute to morry239/HashTableRedBook development by creating an account on GitHub.
HashTableRedBook/Program.cs at master · morry239/HashTableRedBook
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

KeyNotFoundException: The given key was not present in the dictionary.
C#CC# / help
3y ago
Blazor Server App. Error KeyNotFoundException: The given key was not present in the dictionary.
C#CC# / help
3y ago
The Given key was not present in the dictionary
C#CC# / help
16mo ago
the given key "server id" was not present in the dictionary
C#CC# / help
2y ago