title: Multiple inheritance problem in C#
body: <blockquote>
    <p>This question came to my mind while I
    am reading the post <a href="http://blogs.msdn.com/b/csharpfaq/archive/2004/03/07/85562.aspx" rel="nofollow noreferrer"><strong>Why doesn't C#
    support multiple inheritance?</strong></a>
    from <a href="http://blogs.msdn.com/" rel="nofollow noreferrer"><strong>MSDN Blog</strong></a>.</p>
  </blockquote>
  
  <p>At first look at the following code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Text;
  
  namespace ConsoleApplication1
  {
      class A
      {
          int num;
          public A()
          {
              num = 0;
          }
          public A(int x)
          {
              num = x;
          }
          public override int GetHashCode()
          {
              return num + base.GetHashCode();
          }
      }
      class B : A
      {
          int num;
          public B()
          {
              num = 0;
          }
          public B(int x)
          {
              num = x;
          }
          public override int GetHashCode()
          {
              return num + base.GetHashCode();
          }
      }
      class Program
      {
          static void Main(string[] args)
          {
              A a = new A();
              B b = new B();
              Console.Write(a.GetHashCode() + " " + b.GetHashCode());
              Console.Read();
          }
      }
  }
  </code></pre>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/system.object.aspx" rel="nofollow noreferrer"><code>Object</code> class is the ultimate base class of all classes</a>. So it is the base class of <code>A</code> and <code>B</code> both in my program and also make <code>A</code> as a base class of <code>B</code>. So <code>B</code> has now two base class, one is <code>A</code> and another is <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx" rel="nofollow noreferrer"><code>Object</code></a>. I override one method <a href="http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx" rel="nofollow noreferrer"><code>GetHashCode()</code></a> of <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx" rel="nofollow noreferrer"><code>Object</code> Class</a> in class <code>A</code> and <code>B</code> both. But in class <code>B</code>, <code>base.GetHashCode()</code> method returns the return value of <a href="http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx" rel="nofollow noreferrer"><code>GetHashCode()</code></a> method of class <code>A</code>. But I want this value from <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx" rel="nofollow noreferrer"><code>Object</code> class</a>. How can I get that?</p>