So I was wondering what would be the best way to create a class that can hold primitive data types? I want a class that basically can hold any data types, like when I use a constructor to create the class I can make it a float, double, or integer, unsigned, or signed. Also how would you add or subtract doubles and floats?
Also I am looking for broad answers, as in not specific to one programming language, except for c#.
edit: It is very hard to describe what I mean here. Basically what I want is some way that I can create my own type of primitive data type, given certain information. For example I could create a 7 byte unsigned int if I wanted and then add it to a unsigned float I created. Also I want these all to be the same class so that when the two classes are added I do not need to have a add method for every single type of class.