title: Start index cannot be larger than the length of the string
body: <p>I'm trying to check if a foldername doesn't have a extension.<br>
  Because I want to change the name of the folder.<br>
  But you can also change the name of a file.</p>
  
  <p>And I get this error:</p>
  
  <pre><code>"startIndex cannot be larger than length of string.\r\nParameter name: startIndex"}
  </code></pre>
  
  <p>By this line:</p>
  
  <pre><code> string newFilenameExtension = Path.GetExtension(model.FileName.Trim()).Substring(1);
  </code></pre>
  
  <p>How to check if the foldername has no extension?</p>