I have a custom validation attribute which checks to see if two properties have the same values or not (like password and retype password):
[AttributeUsage(A
I'm not sure why your code doesn't work, but through GetType() you can get the expected result:
GetType()
var property = value.GetType().GetProperty(CompareProperty); var comparePropertyValue = property.GetValue(value, null).ToString();