Hi, I'm very new to C# and .Net, I've been working with it for about a month.
My experience has been mainly with Delphi 5 (not .Net).
What I'm looking for is for a shortcut way to override a property without actually having to reimplement the get and set methods.
In other words, override the the property without changing the functionality of the base property and without explicitly having to reimplement the get and set methods to make it do so.
The reason I want to do this is because I want to add a property attribute to the overriding class (a database parameter attribute in this case).
For example, instead of this:
[DBParameter(Name = "StaffMemberID")] //<-- My attribute I'm adding to the overriding class
public override Guid Id
{ //<-- Right now, I can only make it work by reimplemententing get and set, which is tedious and annoying.
get { return base.Id; }
set { base.Id = value; }
}
Can I do something like this: (I know this doesn't work, but is there some way to do this?)
[DBParameter(Name = "StaffMemberID")] //<-- My attribute I'm adding to the overriding class
public override Guid Id; // <-- Meaning: No implementation details here, just do the same as the base class.