Re: Class casting.
- From: Kris <witek7205@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 07:59:14 -0600
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
Thanks.
I did similar thing.
I created a base class and all pages inherit from this base class.
The reason was, that I had different methods in classes.
You mean methods with different signature?
Cause if they have the same signature, well that the idea of using an interface in the first place !
Yes I know, but it's existing application which I moves to VS2005 and somebody used different names for each class. I didn't want to changed it. Maybe later, when I have time
Inteface forces me to implement all of them in each class.
Or you could implement several interfaces, but what I do not understand is how you call the different methods if they have different signatures.
:)
huge case
:)
To much work. 15 interfaces and one method in each.
Virtual methods in base class allow me to implement only needed method,
What about different interfaces?
it was easier to impelemt one base class with 15 virutal methods.
I had to changed inheritance in 15 classess and casting class in that huge case.
.
- References:
- Class casting.
- From: Kris
- Re: Class casting.
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Class casting.
- From: Kris
- Re: Class casting.
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Class casting.
- From: Kris
- Re: Class casting.
- From: Ignacio Machin \( .NET/ C# MVP \)
- Class casting.
- Prev by Date: HI
- Next by Date: writing to a binary file
- Previous by thread: Re: Class casting.
- Next by thread: Listing Windows Form Components?
- Index(es):
Relevant Pages
|
Loading