I have a dll where I defined a specific object (say Point3) and other methods.
I have another dll where I use the same object, but since I want to maintain independence, I declared a new Point3_ object. It is just a container of elements (x, y, z).
Finally, I have a project in which I use both libraries, I would like to know if there is a clean way to cast from Point3 to Point3_, assuming they have compatible types.
Right now I am writing something like:
p_ = new Point3_(pX, pY, pZ);
I would like something like:
p_ = (Point3_)p;
PS: I apologize if this is a duplicate, but I was not sure how to look for it on the Internet.
Thank you in advance
EDIT: I am not opposed to implementing the cast code, but I want to write it in a third project that knows both libraries. Thus, I can separately develop libraries.
source share