Using variables within Attributes in C#

后端 未结 2 1102
面向向阳花
面向向阳花 2020-12-09 15:32

We have some Well-Attributed DB code, like so:

[Display(Name = \"Phone Number\")]
public string Phone { get; set; }

Since it is quite gen

2条回答
  •  忘掉有多难
    2020-12-09 16:08

    You could jump through hoops and use an additional attribute to define the variable portion, but that would be quite a bit of work compared to what it would produce. There's no simple way to accomplish what you're after.

提交回复
热议问题