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 ?
LVL 1
DodsworthAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
CodeCruiserConnect With a Mentor Commented:
Yeah given the problem that ellipse is not inheritable for some reason, the two options are to create a class which uses ellipse to render itself or use the ellipse class itself and store the additional information in tag property.
0
 
CodeCruiserCommented:
Just create a class which uses Ellipse class to draw itself?
0
 
DodsworthAuthor Commented:
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 ?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
DodsworthAuthor Commented:
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 ?
0
 
CodeCruiserCommented:
Yes you can.
0
 
DodsworthAuthor Commented:
But then I'd have to cast it to get at the properties right?
0
 
CodeCruiserCommented:
Yes because it would be stored as type object.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.