S
shapper
Hello,
I have a class A with the property Title:
public class A {
public String Title { get; set; }
}
And a class B then inherits A and has the following properties:
public class B {
public String Name { get; set; }
public String TitleSeparator { get; set; }
public override String Title { get { return String.Concat(title,
TitleSeparator, Name); } set { title = value; } }
private String title;
}
I need to override Title property in A so it gets the value Title +
TitleSeparator + Name.
I am getting an error:
B.Title.get': cannot override inherited member 'A.Title.get' because
it is not marked virtual, abstract, or override
I am marking it as override. You can see on my code.
What am I missing?
Thanks,
Miguel
I have a class A with the property Title:
public class A {
public String Title { get; set; }
}
And a class B then inherits A and has the following properties:
public class B {
public String Name { get; set; }
public String TitleSeparator { get; set; }
public override String Title { get { return String.Concat(title,
TitleSeparator, Name); } set { title = value; } }
private String title;
}
I need to override Title property in A so it gets the value Title +
TitleSeparator + Name.
I am getting an error:
B.Title.get': cannot override inherited member 'A.Title.get' because
it is not marked virtual, abstract, or override
I am marking it as override. You can see on my code.
What am I missing?
Thanks,
Miguel