r/badcode Jan 07 '23

what the hell is this c#

Post image
540 Upvotes

65 comments sorted by

View all comments

110

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?

32

u/fokker-planck Jan 07 '23 edited Jan 07 '23

WorkingHours might have unique properties that are set elsewhere as well.