C# does not provide a method for giving a different name to an inherited property, as derived classes are cast-able back to the base class type. This is a fundamental feature of class inheritance, and not one you can change.
Shadowing is when you create a property in a derived class that has the
same name as one in the base class, this is sometimes used to replace the functionality of a property, but I have a feeling that if you are turning to this before answering the first issue, then you may need to look at the problem again.
Lastly I should emphasise that properties and variables are quite different; variables hold information, where as properties act as an access gateway for information, and do not actually retain information themselves. When a property is written like this:
-
public string Name { get; set; }
-
C# converts this short-cut when the program is built, into something more like this:
-
private string m_Name;
-
-
public string Name
-
{
-
get { return m_Name; }
-
set { m_Name = value; }
-
}
-
This is very relevant for understanding your question about shadowing, because understanding properties will show you weather you actually need to in the first place.
All the best!
Aimee Bailey.