N
Norvin Laudon
Hi,
How can I add a multiplication operator to an existing class ("Point")?
<i.e.>
Point newPoint = new Point(existingPoint.X * scale, existingPoint.Y *
scale);
</i.e.>
I can't seem to create my own class and inherit from Point, since it is
sealed... (I think it's actually a struct).
I could create my own class, and duplicate all of the behaviour of Point,
but I am using many framework methods in my project which take Point as a
parameter. If I made my own class, I would have to cast to (Point) eveytime
I use a framework method...
Any suggestions?
Norvin
How can I add a multiplication operator to an existing class ("Point")?
<i.e.>
Point newPoint = new Point(existingPoint.X * scale, existingPoint.Y *
scale);
</i.e.>
I can't seem to create my own class and inherit from Point, since it is
sealed... (I think it's actually a struct).
I could create my own class, and duplicate all of the behaviour of Point,
but I am using many framework methods in my project which take Point as a
parameter. If I made my own class, I would have to cast to (Point) eveytime
I use a framework method...
Any suggestions?
Norvin