title: Warning in Resharper "Return value of pure method is not used"
body: <p>I have a quick question regarding a warning that I am getting from Resharper in Visual studio on a c# project that I am working. The warning is:</p>
  
  <blockquote>
    <p>" Return Value of pure method is not used"</p>
  </blockquote>
  
  <p>The method where this is happening is as below:</p>
  
  <pre><code> private static bool FilePathHasInvalidChars(string userInputPath)
      {
          try
          {
              //this is where the warning occurs:
              Path.GetFullPath(userInputPath);
  
          }
          catch (Exception e)
          {
              Log.Error(String.Format(
                  "The Program failed to run due to invalid characters or empty " + 
                  "string value for the Input Directory. " + 
                  "Full Path : &lt;{0}&gt;. Error Message : {1}.",
                  userInputPath, e.Message), e);
              return true;
  
          }
          return false;
      }
  </code></pre>
  
  <p>I think I know why the warning is happening.
  I am using <code>Path.GetFullPath(path)</code> only for the purpose of catching all exceptions to do with invalid characters. The path is to be supplied as input by the user therefore I do not actually use the result of the <code>Path.GetFullPath(userInputPath)</code>. The only use I have for it is on a check that I have for this method is on a check that I do on the main method to ensure the path supplied is not empty or does not have any invalid characters.</p>
  
  <p>The place where I use the above method is as below:</p>
  
  <pre><code>if (FilePathHasInvalidChars(inputDirectory))
  {
       return;
  }
  </code></pre>
  
  <p>Basically it is just an exit point before program commences execution using an invalid parameter.</p>
  
  <p>I was wondering if this warning would cause any issues or if I am misusing the <code>Path.GetFullPath</code> method in a way which will cause me problems in the future?</p>