title: delphi type info of object
body: <p>I have code like below</p>
  
  <pre><code> TLivingThing=class
   end;
  
   THuman=class(TLivingThing)
   public
     Language:String
   end;
  
   TAnimal=class(TLivingThing)
   public
     LegsCount:integer;
   end;
  
  
   procedure GetLivingThing()
   var
     livingThing:TLivingThing;
   begin
     livingThing:=THuman.Create();
     if livingThing=TypeInfo(THuman) then ShowMessage('human');
  
     livingThing:=TAnimal.Create();
     if livingThing=TypeInfo(TAnimal) then ShowMessage('animal');
   end;
  </code></pre>
  
  <ol>
  <li><p>how can I check type of object like above code? I tried typeInfo but message never executed</p></li>
  <li><p>How can I access child class public field? just like this?</p></li>
  </ol>
  
  <blockquote>
    <p>TAnimal(livingThing).LegsCount=3;</p>
  </blockquote>
  
  <p>its type safe-fashion? or any better way to accomplish this case?</p>
  
  <p>thanks for sugestion</p>