I have two classes which have are nearly equal except the data types stored in them. One class contains all double values while other contains all float values.
Best way is Serialize object and again desalinize it