Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望在我的类中的某些属性上有一个“显示”属性,并为用户提供在视图中显示其他属性的选项。
我可以从前端更改自定义属性吗?
我不确定属性是动态附加元数据的最佳方法。通常属性是在代码生成时附加的。
您是在谈论过滤器属性吗?如果是,则无法更改静态定义的属性,除非属性中的代码在执行时碰巧引用了静态类或上下文,然后您几乎可以在属性中访问来自该静态或语境...
如果我走错了路,请告诉我。
HTH。