G
Guest
I'm trying to implement two classes, one derived from the other, each of
which is based on an interface and make the whole thing visible to COM.
Here's what I have
public interface IMyBase
{
int Property1 { get; }
void Method1(int n);
}
[ClassInterface(ClassInterfaceType.None)]
public class MyBase : IMyBase
{
public int Property1 { get { /*implementation*/ } }
public void Method1(int n) { /*implementation*/ }
}
public interface IMyDerived : IMyBase
{
void Method2(int n);
}
[ClassInterface(ClassInterfaceType.None)]
public class MyDerived : IMyDerived
{
public void Method2(int n) { /*implementation*/ }
}
When I try to use this from a VB6 client, I can see MyBase properly. I can
also see MyDerived, but only 'Method2'. I cannot see the 'MyBase'
methods/properties from the MyDerived interface. I've tried a few variations
on the declaration of the MyDerived class, including:
public class MyDerived : MyBase, IMyDerived
to no avail.
Does anyone have any ideas how I can make the base interface
methods/properties available through the derived interface?
Thanks.
which is based on an interface and make the whole thing visible to COM.
Here's what I have
public interface IMyBase
{
int Property1 { get; }
void Method1(int n);
}
[ClassInterface(ClassInterfaceType.None)]
public class MyBase : IMyBase
{
public int Property1 { get { /*implementation*/ } }
public void Method1(int n) { /*implementation*/ }
}
public interface IMyDerived : IMyBase
{
void Method2(int n);
}
[ClassInterface(ClassInterfaceType.None)]
public class MyDerived : IMyDerived
{
public void Method2(int n) { /*implementation*/ }
}
When I try to use this from a VB6 client, I can see MyBase properly. I can
also see MyDerived, but only 'Method2'. I cannot see the 'MyBase'
methods/properties from the MyDerived interface. I've tried a few variations
on the declaration of the MyDerived class, including:
public class MyDerived : MyBase, IMyDerived
to no avail.
Does anyone have any ideas how I can make the base interface
methods/properties available through the derived interface?
Thanks.