static void Main(string[] args)
Pashkov p = new Pashkov();
Console.WriteLine(Helpers.IsAllComplexBooleanValidationFalse(p));
[ComplexBooleanValidation]
public bool IsSmart { get; set; }
[ComplexBooleanValidation]
public bool IsGoodLooking { get; set; }
public bool IsYoung { get; set; }
public static class Helpers
public static bool IsAllComplexBooleanValidationFalse<T>(T obj) where T : class
var props = obj.GetType().GetProperties().Where(
prop => Attribute.IsDefined(prop, typeof(ComplexBooleanValidationAttribute))).Select(x=>x.GetValue(obj, null) as bool?);
return props.Any(x=>x != null && !x.Value);
[AttributeUsage(AttributeTargets.Property)]
public class ComplexBooleanValidationAttribute : Attribute