Error!
Success!

Property Matching With Data Annotations

0
kicks

Property Matching With Data Annotations  (Unpublished)

I wondered if it would be possible to compare two properties using data annotations. Usually you place the data annotations attribute on a property to validate the data in some way. I quickly knocked up a custom ValdationAttribute that could be placed on a class that checks for equality between two properties of the class. It checks both type and value equality.


Kicked By:
Drop Kicked By: