title: How to extract an object name
body: <p>i've got a class filled with lists of subclasses:</p>
  
  <pre><code>public class ClassOfKb
  {
      public List&lt;Data&gt; KbDatas {get;set;}
      public List&lt;Product&gt; KbProducts {get;set}
  }
  
  public class Data
  {
      public Guid ID {get;set;}
      public byte[] data {get;set;}
      public string Name {get;set;}
  }
  public class Product
  {
      public Guid ID {get;set;}
      public string Name {get;set;}
      public byte[] Image {get;set;}
  }
  </code></pre>
  
  <p>i create an object:</p>
  
  <pre><code>ClassOfKb kb = new ClassOfKb
  </code></pre>
  
  <p>now i'd like to extract the string "Datas" from the sub-object kb.KbDatas, I tried:</p>
  
  <pre><code>string name = kb.KbDatas.GetType().BaseType.Name.Substring(2);
  </code></pre>
  
  <p>aswell as:</p>
  
  <pre><code>string name = kb.KbDatas.GetType().Name.Substring(2);
  </code></pre>
  
  <p>but nothing gave me what I need, is there any way to do this?</p>
  
  <p>EDIT: to specify my question, the string I need is the name of the list, except the first two letters! KbDatas => Datas</p>
  
  <p>EDIT2: i did a mistake, the list-names and class-names are different and i need the list-name</p>