I mentioned elsewhere, elsewhen, that I’ve recently been drafted into a low-key gamedev team, working in Unity/C#. They’ve got me working on a serious data-crunching item at the moment, and I have SEVERAL questions.
Here’s one of them, for now:
Right now I have a class that I built to be fairly generic because this project involves dealing with many data items which all have a nearly-identical signature except for the datatype they contain, so I just made one class, which privately has a field each for all the possible datatypes.
What I want is to give this class a public Value property, which will just evaluate to the proper datatype on the fly. Is this possible/acceptable in C#?