title: Get all properties of a class recursively C#
body: <p>I have a class which looks like </p>
  
  <pre><code>public class Employee
  {
      public string FirstName { get; set; };
      public string LastName { get; set; }; 
      public Address Address { get; set; };  
  }
  
  public class Address 
  {
      public string HouseNo { get; set; };
      public string StreetNo { get; set; }; 
      public SomeClass someclass { get; set; }; 
  }
  
  public class SomeClass 
  {
      public string A{ get; set; };
      public string B{ get; set; }; 
  }
  </code></pre>
  
  <p>I have figured out a way finding out Properties in a class which are primitive like the string, int bool etc using Reflection </p>
  
  <p>But I also need to find out the list of all complex types in a class like for ex. class Address withing Class Employee and class SomeClass within Address </p>