To simplify some aspects of the upcoming development, I am writing a small library. It is required to expand the double type a little - to add several methods. Looked at how this type is declared in .NET , it turned out that this is a structure that inherits several interfaces. The first thought is to try to inherit this structure, but in C # structures can only inherit interfaces. Then in my structure I implemented all the interfaces that are in double: IComparable, IFormattable, IConvertible, IComparable<double>, IEquatable<double> . Now my structure was supposed to be a double clone, but this did not happen. I cannot directly assign a value to this structure, that is, I cannot write like this
MyDouble a = 20; What do you advise?