title: Class having Generic List in C#
body: <p>I have a class like:</p>
  
  <pre><code> public class boolMessage
  {
      public bool Message { get; set; }
      public ResponseType Resp { get; set; }
  
      public boolMessage(bool _Message, ResponseType _Resp)
      {
          Message = _Message;
          Resp = _Resp;
      }
  }
  </code></pre>
  
  <p>What i want to do is to create a class something like:</p>
  
  <pre><code> public class listMessage
  {
      public List&lt;T&gt; Message { get; set; }
      public ResponseType Resp { get; set; }
  
      public listMessage(List&lt;T&gt; _Message, ResponseType _Resp)
      {
          Message = _Message;
          Resp = _Resp;
      }
  }
  </code></pre>
  
  <p>I think i can do with something like Generic Classes. I have googled it open lot of pages but not able to find some easy solution.</p>
  
  <p>Why i required is like i want to return a array of object that are of different types like Student[] or Teacher[].</p>
  
  <p>These classes like Teacher are generated by Entity Framework.</p>
  
  <p>I would like to return some additional information with them ...</p>
  
  <p>Any help is appreciated</p>