Re: Interface stuff does not compile
- From: Tamas Demjen <tdemjen@xxxxxxxxx>
- Date: Tue, 25 Apr 2006 13:35:31 -0700
solved by design wrote:
ref class pepe:public i1,public i2
{
virtual void m(void){;}
virtual void m2(void){;}
virtual void m3(void){;}
};
The problem here is that your methods in "pepe" are private and virtual, which doesn't work in .NET. In an interface class the default access type is public. In a ref class it's private. You should put the line "public:" before your methods, and it will compile fine, or declare "pepe" a ref struct instead of a ref class.
If you absolutely want to make those methods private, and you're sure what you're doing, just seal the class or all three methods.
Tom
.
- Follow-Ups:
- Re: Interface stuff does not compile
- From: solved by design
- Re: Interface stuff does not compile
- References:
- Interface stuff does not compile
- From: solved by design
- Interface stuff does not compile
- Prev by Date: Re: Interface stuff does not compile
- Next by Date: Re: Implementing assign operator ( = )
- Previous by thread: Re: Interface stuff does not compile
- Next by thread: Re: Interface stuff does not compile
- Index(es):