C# is a versatile language; it gives you a lot of freedom to manipulate your own and existing classes. You can overload operators to use
In the comments, the OP has specifically mentioned using
System.Drawing.PointF. What I've done in the past, with sealed classes like this, is to develop a second similar class using the .NET source as described above. Let's call this second class
MyCustomPointF. I can write operators for my new class. But what I'm also going to add is what's called an implicit conversion operator that helps the compiler to convert an instance of my class back to a
System.Drawing.PointF instance when I need it (without calling an external conversion function). It's not perfect, but it's an option.