鉴于以下代码片段...
public MyBaseClass
{
...
[DataMember]
public virtual Rectangle MyRectangle
{
get;
set;
}
....
}
public MyDerivedClass : MyBaseClass
{
...
[DataMember] // Is that necessary?
public override Rectangle MyRectangle
{
get { return base.MyRectangle; }
set {
...
base.MyRectangle = value;
}
}
....
}
...我想知道是否也[DataMember]
应声明为MyDerivedClass.MyRectangle
?谢谢。