title: C# Extension method to filter list
body: <p>I found following extension method to filter list. I am very new to this hence I wanted to check if someone can help me. This method compare exact values but I want to use contains instead of exact compare. Any thoughts</p>
  
  <pre><code>    public static IEnumerable&lt;T&gt; FilterByProperty&lt;T&gt;(this IEnumerable&lt;T&gt; source,string property,object value)
      {
          var propertyInfo = typeof(T).GetProperty(property);
          return source.Where(p =&gt; propertyInfo.GetValue(p, null) == value);
      }
  </code></pre>