Simulating Multiple Inheritance

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: blackdevil1979 (blackdevil1979_at_yahoo-dot-com.no-spam.invalid)
Date: 08/31/04


Date: 31 Aug 2004 16:03:13 -0500

Hello,

> "In COM, multiple inheritance between interfaces is not supported.
However, by using the derived members capability, multiple
inheritance can be simulated."..MSDN Library

I have created an object which involve a datagrid. But when I create a
form and try to use the object, I found that some of the property
exists for a datagrid does not show in the
usercontrol in the form, for example
BackgroundColor Property.

So i thought of creating properties in my usercontrol, but someone
told me there is a better way because by generating properties in the
user control, u tend to duplicate.

And then i come accross this Multiple Inheritance. And since .Net does
not support multiple inheritance, the MSDN Suggest to use the derived
members capability.

As I read on, they mentioned something about
[u:e21e1feeb7]IInterfaceDef2::CreateAlias
[/u:e21e1feeb7], but i think they did not provide
sample or an example(or at least I cannot find them), thus I cannot
imagined how this IInterfaceDef2::CreateAlias supposed to look/be
like.. so is there someone who have experience in this
IInterfaceDef2::CreateAlias thing?

1) Can you please give me some clues or samples (is better) of this
IInterfaceDef2::CreateAlias. :)

2) Or if somene can tell me the proper way to do this(not necessarily
the IInterfaceDef2::CreateAlias)? So far the properties
that I have created only take effect after the FORM is load, not
during Design time like normal Datagrid Properties can
do.

Thanks.



Relevant Pages

  • Re: Inheritance
    ... What I would like to do is start a league with variables describing the ... Then I would like to start multiple divisions that would be using the time ... What I read about inheritance is that it build on ... but you would not do this to an array item. ...
    (microsoft.public.vc.mfc)
  • Re: advice on programming style: is multiple inheritance bad?
    ... should we not use multiple inheritance ... One major reason why multiple inheritance has such a bad name can be sheeted ... proper subset of the potential instances of their ... _is_ an abstract class, and have both class A and class B inherit from that. ...
    (comp.lang.python)
  • Re: Java and OOP
    ... And Java does not support multiple inheritance. ... So delegation is not an alternative to OOP, ...
    (comp.lang.java.programmer)
  • Re: Can someone educate me?
    ... You have to do a fill with each DataAdapter ... You have a plus sign because DataGrid show relations between tables. ... > So I have a few questions about how to proceed selecting and updating the ... > Now that I have multiple dataadapters, and each one has it's own ...
    (microsoft.public.dotnet.framework.adonet)
  • implementing inherited control re:Ken Tucker - Inherited DataGrid Class
    ... I understand the concept of inheritance but I am lost as far as implementing ... an inherited control ie a DataGrid. ... Dim hti As DataGrid.HitTestInfo ... Public Sub New ...
    (microsoft.public.dotnet.languages.vb)