Original Post
Hi I have many classes, most of which either have a property called "Name" or a property called "ID", or both (and the appropriate private members to support that). As far as implementation details are concerned I can/could have: 1) retyped these for every new class I create, which is what I would like to avoid. 2) created 2 classes such as "Named" and "Identified" and inherited from one or both of them as needed, but C# does not permit multiple class inheritance. 3) ... copy-paste! For bigger chunks of code I would have used composition plus a bunch of methods to expose the functionality but in this situation that is just as much typing as reimplementing it every time. My goal here is not polymorphism, I just want to minimize the typing. Is there any recommended solution to this rather classic issue? Or am I stuck with option 3? Thank you for your time.