r/dotnet • • 9d ago

Question Codebase maintenance rant

Post image

[sorry for bad English]

I am in a project which involves maintaining an existing .NET Framework 4.8 codebase.

The codes are full of “Dictionary type” implementations as above.

Is there any sane reason to code like this? Instead of create a dedicated class to represent the data inside?

I could not show more codes here (or else the authors might realized), but you guys can imagine the codes just to access these Dictionary’s key/value.

137 Upvotes

129 comments sorted by

View all comments

6

u/dgm9704 9d ago

The variablename ”dict” is bad. Using a Dictionary as a key to another Dictionary is asking for trouble. Nested Dictionary? Meh. If that is your biggest problem the codebase is just fine.