Link to home
Start Free TrialLog in
Avatar of Dodsworth
Dodsworth

asked on

Circle Class

I need to write a class that presents graphically as a circle.

My first stumbling block is that the Ellipse class is NotInheritable.

How should I proceed ?
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Just create a class which uses Ellipse class to draw itself?
Avatar of Dodsworth
Dodsworth

ASKER

Hmm.. I've been pondering your suggestion for a week now.

My Circle class is uses most of the properties and methods of the ellipse class but I need to link in additional data (createddate, updateddate, owner, etc)

In previous projects I'd inherit a button, as it has all the properties and events that I need, but this requirement is all about circles.  Why can't I inherit an ellipse anyway ?

I'm tempted to write some bad code and parse the additional properties out of .tag !

Any ideas on a less dirty approach ?
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've only ever parsed out strings from a .tag but just noticed..

Public Property Tag As Object

Could I write a class for my additional properties and some how place a pointer to an instance of the class in the .tag property ?
Yes you can.
But then I'd have to cast it to get at the properties right?
Yes because it would be stored as type object.