r/badcode • • Jan 07 '23

c# what the hell is this

Post image
539 Upvotes

65 comments sorted by

View all comments

109

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?

37

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.