duplicate inheritance on methods with parameters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahumam0
    New Member
    • Apr 2010
    • 3

    #1

    duplicate inheritance on methods with parameters

    Hello
    Would you please tell me how can I do the following

    Abstract class A
    {
    public abstract void function( type a1 , type a2 )
    }

    class B: A
    {
    public override void function(type a1 , type a2)
    { }

    }
    Class C: B
    {
    public override void function(type a1, typea2(
    { }
    }


    Note: The problem is that class C cant see the method "function"

    Would you help me?
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    That looks fine
    What is the error you are getting?
    Obviously this isn't the actual code you are using since this wouldn't compile...
    Can you provide the actual code that is failing?

    Comment

    • jkmyoung
      Recognized Expert Top Contributor
      • Mar 2006
      • 2057

      #3
      Do you mean: How can I get an object of type C, to call B's function method?
      Consider making c's method new instead of override. (Not sure if that's what you want, but consider it).

      Comment

      Working...