I'd like to make a library in C# which does some works with Point object but in C# there is a lot of frameworks with a lot of implementation of Point : Point, Vector2f (unity), Vector2f (monogame), Vector3f ... and I'd like that my library works with all of them.
The only constraint is that the object has properties X and Y and that X and Y must implement IComparable interface. The problem is that I can't found a way to do that without using reflexion (not the best way I think).
I don't want that all class Point inherite from my interface but I'd like them to have 2 fields / members X and Y.
Is there a way to do that ? Like
class MyAlgo<T> : where T has X and Y properties {}