Is it possible to get propertyname by its attributename
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all, consider the following property private string _name; [DBField("Emp_Name")] public string Name { get{returen _name;} set{_name=value;} } I want to populate the Name property like this: expectedProperty=fn_2_getProperty("Emp_Name"); propertyInfo.SetValue(expectedProperty,reader.field["Emp_Name"]); In statement: I have a property "Name" decorated with DBfield attribute. the value of DBField is "Emp_Name". Now I want to populate Name property with the help of "Emp_Name". how can I do it. thanks in advance