Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hiding a method/property from an inherited class

0 views
Skip to first unread message

A Ratcliffe

unread,
Nov 3, 2003, 7:38:47 AM11/3/03
to
Back again...

I have some classes that inherit from each other, as an example...

Point (abstract base class)

Point3 (for 3D points), derived from Point

Point4 (adds a homogenous co-ordinate) derived from Point3

Point3 has a Method - MoveBy(float dx, float dy, float dz), for moving it
relatively in 3D space.

Point4 has its own equivalent - MoveBy(float dx, float dy, float dz, float
dw), but I want to hide Point3's MoveBy, so it isn't available when you are
working with a Point4. There are other methods/properties of Point3 that
still make sense for Point4, so I don't want to love all the inherited
methods/properties.

Hope this makes sense, and thanks for all your help,

Yours,

Ann-Marie Ratcliffe


A Ratcliffe

unread,
Nov 3, 2003, 7:45:03 AM11/3/03
to
Posted to the wrong group.... I'd appreciate it if an admin could delete
this.


0 new messages