L
Larry Smith
I just read a blurb in MSDN under the C++ "ref" keyword which states that:
"Under the CLR object model, only public single inheritance is supported".
Does this mean that no .NET class can ever support multiple inheritance. In
C++ for instance I noticed that the compiler flags an error if you use the
"ref" keyword on a class with multiple base classes. This supports the above
quote. However, under the "CodeClass2.Bases" property (part the VS
extensibility model), it states that:
"Bases are super types of CodeElements. For Visual Basic and Visual C#
there is always only one element in the collection except when the code type
is a CodeInterface".
This is true of course since these languages only support single (class)
inheritance. However, it should be true for all .NET classes based on the
first quote above. My issue is therefore this. I want to retrieve the base
class of an arbitrary class in an arbitrary code file by invoking
"CodeClass2.Bases.Item(1)". This works in my testing but will it always work
for all languages in theory, assuming the class I'm targetting is always a
..NET class of course. Thanks in advance.
"Under the CLR object model, only public single inheritance is supported".
Does this mean that no .NET class can ever support multiple inheritance. In
C++ for instance I noticed that the compiler flags an error if you use the
"ref" keyword on a class with multiple base classes. This supports the above
quote. However, under the "CodeClass2.Bases" property (part the VS
extensibility model), it states that:
"Bases are super types of CodeElements. For Visual Basic and Visual C#
there is always only one element in the collection except when the code type
is a CodeInterface".
This is true of course since these languages only support single (class)
inheritance. However, it should be true for all .NET classes based on the
first quote above. My issue is therefore this. I want to retrieve the base
class of an arbitrary class in an arbitrary code file by invoking
"CodeClass2.Bases.Item(1)". This works in my testing but will it always work
for all languages in theory, assuming the class I'm targetting is always a
..NET class of course. Thanks in advance.