Using variables within Attributes in C#
- by tehp
We have some Well-Attributed DB code, like so:
[Display(Name = "Phone Number")]
public string Phone { get; set; }
Since it is quite generic we'd like to use it again, but with a different string in the Name part of the attribute. Since it's an attribute it seems to want things to be const, so we tried:
const string AddressType = "Student…