Im a beginner in C # and OOP. Im uses two third-party APIs that contain similar types of objects that have properties that contain the same values, but both APIs have unique (and identical) functions that I need to use. For example:
API1 - point class
General properties
X: Double
Y: Double
Open method
Distance()
ToArray ()
API2 - point class
General properties
X: Double
Y: Double
Open method
Project ()
ToArray ()
I have currently created helper methods for converting from an API1 Point class to an API2 class and vice versa, but there should be a better solution. What will a programming specialist do in this situation? Thanks!
source
share