I'm trying to create a custom attribute that display the value of property CountryText
[DisplayNameProperty("CountryText")]
public string Country { get; set; }
public string CountryText { get; set; }
this the code of the attribute
namespace Registration.Front.Web.Validators
{
public class RegistrationDisplayNameAttribute:DisplayNameAttribute
{
private readonly PropertyInfo _proprtyInfo;
public RegistrationDisplayNameAttribute(string resourceKey):base(resourceKey)
{
}
public override string DisplayName
{
get
{
if(_proprtyInfo==null)
}
}
}
}
How can i do the reflexion to obtain the value of the fild named resourceKey
in my code of attribute??