title: how to search an obj for a variable, given variable name as string
body: <p>I have a large list of objects, the object contains things like string name, string address, string city.</p>
  
  <p>I want to create a findEqualsMatch method like this.. where it takes in a string called varName, and then searches the variable of the object which varName is called.</p>
  
  <p>that way if i do data.FindEquals("name", "tom") it searches the objects "name" property to be equal to tom, at the same time you can write "address" and it will search the address property.</p>
  
  <pre><code>public List&lt;Datum&gt; FindEquals(String varName, String value)
              {
                  List&lt;Datum&gt; results = new List&lt;Datum&gt;();
                  foreach (Datum result in data)
                  {
                      //should search for address variable
                      // instead of if(result.Address == value)
  
                      if (result.varName == value)
                          results.Add(result);
  
                  }
  
                  return results;
              }
  
  List&lt;Datum&gt; newResults = data.FindEquals("address", "123 street");
  </code></pre>
  
  <p>the whole purpose is to query a set of factual API results and return a set that is searched on by any variable type you insert into the function.</p>