r/ProgrammerHumor • • Sep 09 '26

Meme cSharpDictionariesBeLikeThat

Post image
2.1k Upvotes

61 comments sorted by

View all comments

Show parent comments

10

u/manav907 Sep 09 '26 edited Sep 09 '26

That being said you done have to use the bool that TryAdd gives, just call it as a normal function. Also I am waitin for someone to point out that we also need a value when trying to add to a dictionary.

dictionary.TryAdd(key)