Let’s say I have a system that must store how many people voted on fighter A and how many on fighter B.
Let’s say ratio is 200:1
How can I store that value in a single variable, instead of storing both values (number of voters on A and number of voters on B) in two variables.
How you would do that?
From the way that the question is worded this might not be the answer you are looking for, but the easiest way is to use a struct:
You will almost certainly want to use properties instead of fields and you will probably also want to overload
==and!=, something like: