Tech Off Post

Single Post Permalink

View Thread: Generi type inheritance ????
  • User profile image
    Pop Catalin Sever

    I'm, not talking about mixins , they are slithly diferent than what I mean. I don't just want an agregation of fields and methods created from clases.

    Also what I'm saying is not like "Multiple Inheriance" at all, the new classes still have a single inheritance path

    for my previouse example :

    class MyClass<T> : T {
    }

    MyClass<Employ> is a subclass o Employ and that's is his type is

    typeof (MyClass<Employ>) wich IS an Employ derived type


    also MyClass<Company> is a Company type and the only conection to MyClass<Employ> could be the fact that they both are objects


    Also i thing the same constraigt system could be applied for "this" reference inside the generic class