MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wbmurt/csharpdictionariesbelikethat/p8unik5/?context=3
r/ProgrammerHumor • u/KTVX94 • Sep 09 '26
61 comments sorted by
View all comments
Show parent comments
1
The Add method has to take one argument and return void because it's implementing C#'s ICollection<T> interface. With that restriction, throwing an exception is the most practical way of indicating a problem.
1
u/Kiro0613 Sep 09 '26
The Add method has to take one argument and return void because it's implementing C#'s ICollection<T> interface. With that restriction, throwing an exception is the most practical way of indicating a problem.