相关疑难解决方法(0)

如何使用反射查找数据注释属性及其参数

我有一些数据注释属性,如下所示:

[StringLength(20, MinimumLength = 5, ErrorMessage = "First name must be between 5 and 20 characters")]
Run Code Online (Sandbox Code Playgroud)

如何使用反射查找数据注释属性及其参数?

谢谢

c# reflection attributes data-annotations c#-4.0

8
推荐指数
1
解决办法
8754
查看次数

标签 统计

attributes ×1

c# ×1

c#-4.0 ×1

data-annotations ×1

reflection ×1