title: How to get the metadata of a file in SharePoint
body: <p>I am trying to get the name property of a file on SharePoint ?</p>
  
  <p>If I try to get the metadata of the columns I created, I can get this data with this method</p>
  
  <p><strong>file</strong> is SPFile.</p>
  
  <pre><code>if (file.GetProperty("DocId") != null)
  {
      docId = file.GetProperty("DocId").ToString();
  }
  </code></pre>
  
  <p>But when I try to get the name</p>
  
  <pre><code>if (file.GetProperty("Name") != null)
  {
      docId = file.GetProperty("Name").ToString();
  }
  else {...}
  </code></pre>
  
  <p>it goes to else statement.</p>
  
  <p>Where do I go wrong?</p>
  
  <p>Thanks.</p>