Re: interface implementation and inheritance.
- From: parez <psawant@xxxxxxxxx>
- Date: Thu, 27 Mar 2008 06:37:21 -0700 (PDT)
On Mar 26, 6:57 pm, "Peter Duniho" <NpOeStPe...@xxxxxxxxxxxxxxxx>
wrote:
On Wed, 26 Mar 2008 14:06:02 -0700, parez <psaw...@xxxxxxxxx> wrote:
The following compiles.. Is this expected behavior?
Is what "expected behavior?
If you're using C# 3.0, then yes...I don't see any reason what you posted
wouldn't compile. But whether it does what you really want it to do, I
can't say. You haven't declared class A as implementing Interface2, even
though it does appear to. Nor does the code appear to address the
question you originally asked (that is, having the implementation of a
single interface spread across multiple classes).
But if the code does what you want it to do, seems fine to me. :)
Pete
Code does address the original question...
Is it a good idea(or is it possible) for to implement half an
interface in base class and half in derived class.
Half (i should have said some) of MyInterface is implemented in
Class A (base class) and half in Class B.
Yes.. It does do what I want it to do..
And why should it work only in c# 3.0? I am using .net 3.0( i think is
c# 2.0)
TIA
.
- Follow-Ups:
- Re: interface implementation and inheritance.
- From: Peter Duniho
- Re: interface implementation and inheritance.
- References:
- interface implementation and inheritance.
- From: parez
- Re: interface implementation and inheritance.
- From: Peter Duniho
- Re: interface implementation and inheritance.
- From: parez
- Re: interface implementation and inheritance.
- From: parez
- Re: interface implementation and inheritance.
- From: Peter Duniho
- interface implementation and inheritance.
- Prev by Date: PropertyChanged and .Net 1.1
- Next by Date: Re: interface implementation and inheritance.
- Previous by thread: Re: interface implementation and inheritance.
- Next by thread: Re: interface implementation and inheritance.
- Index(es):
Relevant Pages
|