title: How to determine if a object type is a built in system type
body: <p>I am writing a simple <code>List&lt;t&gt;</code> to CSV converter. My converter checks the all the <code>t</code>'s in List and grabs all public properties and places them into the CSV.</p>
  
  <p>My code works great (as intended) when you will use a simple class with a few properties.</p>
  
  <p>I would like to get the <code>List&lt;t&gt;</code> to CSV converter to also accept the System types such as String and Integer. With these system types I do not want to get their public properties (such as Length, Chars etc). Thus I would like to check if the object is a System type. By System type I mean one of the built in .Net types such as <code>string, int32, double</code> etc.</p>
  
  <p>Using GetType() I can find out the following:</p>
  
  <pre><code>string myName = "Joe Doe";
  
  bool isPrimitive = myName.GetType().IsPrimitive; // False
  bool isSealed = myName.GetType().IsSealed; // True 
  // From memory all of the System types are sealed.
  bool isValueType = myName.GetType().IsValueType; // False
  
  // LinqPad users: isPrimitive.Dump();isSealed.Dump();isValueType.Dump();
  </code></pre>
  
  <p>How can I find if variable myName is a built in System type? (assuming we don't know its a string)</p>