title: Why isn't this CLS compatible?
body: <p>I have the following Interfaces:</p>
  
  <pre><code>public interface ITemplateItem
  {
      int Id { get; set; }
      String Name { get; set; }
      String Text { get; set; }
      int  CategoryId { get; set; }
      int  Typ { get; set; }
  }
  
  public interface ITemplateCategory
  {
      int Id { get; set; }
      String Name { get; set; }
  
      List&lt;ITemplateItem&gt; TemplateItems { get; set; }
      void Add(ITemplateItem item);
      void Remove(ITemplateItem item);
      ITemplateItem CreateTemplateItem();
  }
  </code></pre>
  
  <p>My implementation of the ITemplateItem looks like this:</p>
  
  <pre><code>public class MyTemplateItem : ITemplateItem
  {
      #region ITemplateItem Member
      public int Id { get; set; }
      public String Name { get; set; }
      public String Text { get; set; }
      public int CategoryId { get; set; }
      public int Typ { get; set; }
      #endregion
  }
  </code></pre>
  
  <p>But for the ITemplateCategory Implementation the compiler tells me that my class is not CLS Compliant.</p>
  
  <pre><code>public class MyTemplateCategory : ITemplateCategory
  {
      #region ITemplateCategory Member
      public int Id { get; set; }
      public String Name { get; set; }
  
      // Warning: type of TemplateItems not CLS-Compliant
      public List&lt;ITemplateItem&gt; TemplateItems { get; set; } 
  
      // Warning: Argument not CLS-Compliant
      public void Add(ITemplateItem item)
      {
          throw new NotImplementedException();
      }
  
      // Warning: Argument not CLS-Compliant
      public void Remove(ITemplateItem item)
      {
          throw new NotImplementedException();
      }
  
      // Warning: Return type not CLS-Compliant
      public ITemplateItem CreateTemplateItem() 
      {
          throw new NotImplementedException();
      }
      #endregion
  }
  </code></pre>
  
  <p>Ok,</p>
  
  <p>I could just ignore these warnings or turn them off by adding the CLSCompliant(false) attribute to my class.
  But I am curious why this happens. Expecially because the compiler does not complain about the inferface itself.</p>
  
  <p>Does this happen for classes that expose Interfaces in general or did I just use a forbidden keyword?</p>