I would like to add 'Price' on class B as reference to 'Price' on class A. I want to avoid the repetition of the declaration of a property:
public class A{
// ... stuff
[Required]
[Display(Name = "Price (Euros)")]
[Range(1, 1000)]
public float Price { get; set; }
// ... more stuff
}
public class B{
// ... stuff
[Required]
[Display(Name = "Price (Euros)")]
[Range(1, 1000)]
public float Price { get; set; }
// ... more stuff
}
So, for example, if in class A i want to change the range i don't want to have to remember which other classes have the same property.