title: How to get Column names from a SharePoint list?
body: <p>I created a List and added three columns to it.  When I look at the list in my "List Settings" page, I see the three columns I created and some default ones as well (Title, Created By and Modified By).  When I view the Items in the list I just see the columns I created.</p>
  
  <p>My issue is that when I try to get a list of columns for my list from code I get a whole slew of other ones that I don't see anywhere (Version, Attachments, Item Child Count, etc.)</p>
  
  <p>Here is the code I am using to get this list:</p>
  
  <pre><code>        List&lt;string&gt; visFields = new List&lt;string&gt;();
          foreach (SPField field in myList.Fields)
          {
              if (!field.Hidden)
              {
                  visFields.Add(field.Title);
              }
          }
  
          return visFields;
  </code></pre>
  
  <p>Is looking at the fields the wrong way to go about this?  How can I get the same list of columns that is displayed when you view the items in the list?</p>