title: C# get name of object as string
body: <p>I have an object named 'Account' and the following code:</p>
  
  <pre><code>Account objAcc = new Account();
  objAcc.Name = "Test";
  </code></pre>
  
  <p>The above is working fine, as expected. I now have a list of values as follows:</p>
  
  <pre><code>string props = "Name,Address,Telephone";
  </code></pre>
  
  <p>Now, what I want to do is see if "Name" exists in that list. I only have the object to use though (hard coding a case statement etc isn't possible as the object is dynamic), so from objAcc.Name, I somehow need to get "Name" from that, and then see if it's in the list.</p>
  
  <p>Thanks in advance, I hope it's clear enough,</p>
  
  <p>Dave</p>