title: Is it possible to re-write this class without using "this is"
body: <p>I reviewed this code and I want to refactor keeping the same logic without using <strong>this is</strong></p>
  <pre class="lang-cs prettyprint-override"><code>class Animal
  {
      public void Verify()
      {
          if (this is Animal) {
              Console.WriteLine(&quot;Animal&quot;);
          } else if (this is Person) {
              Console.WriteLine(&quot;Person&quot;);
          } else if (this is Home) {
              Console.WriteLine(&quot;Home&quot;);
          } else {
              Console.WriteLine(&quot;*******&quot;);
          }
      }
  }
  class Person
  ...
  class Home
  ...
  </code></pre>