title: How to detect if a Type is a List?
body: <p>Suppose I have access to the type of a field using reflection:</p>
  
  <pre><code>FieldInfo item;
  Type type = item.FieldType;
  </code></pre>
  
  <p>I want to know if <code>type</code> is a generic <code>List</code> or not, How can I do that? I need something like as follows, But it does not work:</p>
  
  <pre><code>if (type == typeof(List&lt;&gt;))
  </code></pre>