I have a bunch of data classes in my C# project. I need to perform a validation before the processing of the objects of those classes. The classes donot have a common interface. I am trying to formulate some sort of design pattern where I can specify the validations that need to be performed on each field of the class; without having a set of if else type conditions.
I came across the specification pattern, but that did not seem very convincing.
Are there any existing patterns/C# methodologies that I can use?
[Update: I ended up using a combination of the Annotations and the Specification pattern. The basic validations can be done via the annotations. If any special cases occur which cannot be validated via annotations, those validations are written via the specification]