title: Trying to inherit three base classes and can't
body: <p>I have a few questions related to the design of my <code>User</code> class but
  they are different enough that I think they should be independent
  questions.</p>
  <p>So, the first is related to inheritance of base classes. I am currently
  inheriting two classes, <code>ProfileBase</code> and <code>ISessionMgrEntry</code> as such:</p>
  <pre><code>public class User : ProfileBase, ISessionMgrEntry
  </code></pre>
  <p>But, I also want to inherit a third class, <code>MembershipUser</code>, like this:</p>
  <pre><code>public class User : ProfileBase, MembershipUser, ISessionMgrEntry
  </code></pre>
  <p>However, the compiler won't let me do that. Why? And, how do I get
  around this?</p>
  <p>Thanks.</p>
  <p>PS - ASP.NET 3.5 / C#</p>
  <p><strong>EDIT</strong></p>
  <p>Hi. I think the below solution may work for what I am trying to acheive. It seems pretty simple and straight forward. I am doing this so I can create a complete/combined <code>User</code> object. Does anybody see any reason why this might cause problems? One that came up while I was ding this is overlapping properties. For example, both <code>MembershipUser</code> and <code>ProfileBase</code> share &quot;<code>UserName</code>&quot;. Should I just chose one or the other or will this be a design flaw? Suggestions? Thanks again.</p>
  <pre class="lang-cs prettyprint-override"><code>public class User
  {
      #region Constructors
      
      private readonly MembershipUser _MembershipUser;
      private readonly ProfileBase _ProfileBase;
      
      #endregion
  
      public User()
      {
          _MembershipUser = new MembershipUser();
          _ProfileBase = new ProfileBase();
      }
  
      public string Comment
      {
          get { return _MembershipUser.Comment as string; }
          set { _MembershipUser.Comment = value; }
      }
  
      public bool IsAnonymous
      {
          get { return _ProfileBase.IsAnonymous as bool; }
      } 
  
      ....
  }
  </code></pre>