title: C# how to get current class instance equivalent to self php
body: <p>Lets suppose we have these classes:</p>
  
  <pre><code>class A {
      public string attr = "Class A";
  
      public static void getAttribute(){
           self currentClass = new self(); // equivalent to php
           Console.Write("Attribute : " + currentClass.attr);
      }
  }
  
  Class B : A {
      public string attr = "Class B";
  }
  
  B = new B();
  B.getAttribute();
  </code></pre>
  
  <p>I want <code>B.getAttribute();</code> to print <code>Attribute: Class B</code>. How can I do this?</p>