The input generic type could be a int, double, long, short, unsigned, etc. and they all represent numeric values.
Besides checking if the type equals to each individual type:
(typeof(T) == typeof(int)) || (typof(T) == typeof(double)) ...
is it any way to simplify this or-cluster?
EDIT:
I am aware of the other threads that provide solutions to check types, but they are mostly using switch-cluster or or-cluster, which is very similar to my solution above in the way that we still need to go over each individual type. I am looking for a more agile solution that avoids going into each types. This may be impossible but I think this would be a pretty handy thing to provide in generic class.