title: How do I define IList<T> in Interface
body: <p>I have method readExcelFile() which takes parameter and generic type where generic type is class so the idea is give this method require parameter to read excel file and I get List of object having excel records. </p>
  
  <p>The all is working fine that state above but I also need to define interface </p>
  
  <pre><code>public interface IProcessExcel 
  {
      IList&lt;T&gt; ReadExcelFile(string filePath, int readExcelRowFrom, int headerRow);  
  }
  </code></pre>
  
  <p>and in above code I am getting error</p>
  
  <pre><code> The Type or namespace T could not be found(missing directive or assembly )
  </code></pre>
  
  <p>implementation code</p>
  
  <pre><code> public class ProcessExcel&lt;T&gt;: IProcessExcel where T: class
  {
      private static Excel.Application xlApp;
      private static Excel.Workbook xlWorkbook;
      private static Excel.Worksheet xlWorkSheet;
      private static Excel.Range xlRange;
      private string GivenFilePath = string.Empty;        
      private IList&lt;string&gt; ExcelFileExtensionList = new string[] { ".xls", ".xlsx", ".xlsm", ".xltx", ".xltm" };
      private T newObject;
      List&lt;T&gt; ExcelRecordList = new List&lt;T&gt;();
  
      public ProcessExcel()
      {
      }
  
  
      public IList&lt;T&gt; ReadExcelFile(string filePath, int readExcelRowFrom, int headerRow) 
      {
          this.FilePath = filePath;
          this.ReadExcelRowFrom = readExcelRowFrom;
          this.HeaderRow = headerRow;
          this.ReferenceClass = typeof(T);
          this.ValidateExcelFile();
           this.ProcessReadExcelFile();
  
          return ReadExcelFile;
      }
  </code></pre>