I\'m having a hard time describing this problem. Maybe that\'s why I\'m having a hard time finding a good solution (the words just aren\'t cooperating). Let me explain via cod
While I don't have a ton of C# experience, were this Java, what I would instead do is create an interface IPeelable
and another ICoreable
, and have the fruit classes implement those. Then, instead of avoiding not
logic, you could simply check to see if the fruit you've gotten implements either of the interfaces -- in this way, you can add future fruits which implement both peelable and coreable, like the muskmelon.