Re: Class casting.



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 !

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.

Virtual methods in base class allow me to implement only needed method,

What about different interfaces?



--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


.



Relevant Pages

  • Re: Class casting.
    ... I created a base class and all pages inherit from this base class. ... Cause if they have the same signature, well that the idea of using an interface in the first place! ... Or you could implement several interfaces, but what I do not understand is how you call the different methods if they have different signatures. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Abstract Class Theory
    ... >> there would be no need for abstract methods, and no abstract classes. ... >> the derived class will be overriding, or even overloading, the base class ... > class inherit from both. ... Actually you are confusing abstract classes and interfaces. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Suggestion
    ... > problems when changing the signature of the function in the base class, ... > and forgetting to change the signature of the derived functions ... Accessing the objects with base class pointers, ... > This has made me come up with an idea for a compiler/language feature that ...
    (comp.lang.cpp)
  • Exposing C# to COM / Inheritance of objects/interfaces
    ... I have ComVisible set to true for the entire assembly. ... I have base class A. ... There are interfaces IA and IAEvents for accessing properties of this object ...
    (microsoft.public.dotnet.framework.interop)
  • IGNORE - Re: Exposing COM & inheritance problems
    ... I have base class A. ... There are interfaces IA and IAEvents for accessing properties of this ... object and exposing events. ... when I then add a IBEvents (deriving from IAEvents) and change ...
    (microsoft.public.dotnet.languages.vc)