* Larry Smith wrote, On 14-7-2007 1:49:
[quoted text, click to view] > 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.
The Visual Studio Extensibility model also supports non-CLR languages
(native C++ for example), so it has support for multiple inheritance.
The .NET types do not support multiple inheritance as you've already
found out. I've read a couple of rumors that multiple inheritance will
probably find its way back into the CLR in a future version...