title: return IList but use List
body: <p>Is it OK to to declare a return type of a method, e.g. IList that is less than you define it internally, e.g. List? Will it compile and run?</p>
  
  <pre><code>   protected static IList&lt;String&gt; GetJobFiles(String folder, String fileExtension)
      {
          List&lt;String&gt; jobFiles = new List&lt;String&gt;();
  
          if (System.IO.Directory.Exists(folder))
          {
              string[] files = Directory.GetFiles(folder, fileExtension);
  
              // Check if for matching files
              if (files.Length &gt; 0)
              {
                  // add the files to our list collection
                  jobFiles.AddRange(files);
              }
  
          }
  
          return jobFiles;
      }
  </code></pre>