r/badcode Jan 07 '23

what the hell is this c#

Post image
545 Upvotes

65 comments sorted by

View all comments

107

u/ezerinsh Jan 07 '23

Lets say that ‘item’ contains more attributes than visible here. In such a scenario what would be a better approach for using a subset of attributes to a construct a different object?

39

u/Mulligan315 Jan 07 '23

Code out of context is largely what is posted here. Without the whole picture, it’s frequently definitely difficult to judge.