title: C# using propertyinfo ( reflection ) in LINQ statement
body: <p>Instead of setting each boolean property in object manually. I would like to do it for all boolean properties using reflection.</p>
  
  <pre><code>//For each boolean property: if any in collection is true, result is true.
  private ActionFlagsViewModel StackActionFlagsViewModels(List&lt;ActionFlagsViewModel&gt; afList)
  {
      var result = new ActionFlagsViewModel();
      foreach (var propInfo in typeof(ActionFlagsViewModel).GetProperties().Where(p =&gt; p.PropertyType == typeof(System.Boolean)))
      {
          // TODO: Do this using reflection for each property info.
          result.ShowActionAbort = afList.Where(afvm =&gt; afvm.ShowActionAbort == true).Any();
          result.ShowActionAssign = afList.Where(afvm =&gt; afvm.ShowActionAssign == true).Any();
      }
      return result;
  }
  </code></pre>
  
  <p>This should be very easy right ?</p>