N
Nathan Sokalski
I am overloading the + operator (and several others that are used with
numeric types). Because there are many possible combinations of parameters
for this due to all the different numeric types, and the code will be the
same for almost all of them (single, double, decimal, short, integer, long,
etc.), I was wondering if there is a more efficient way to do the
overloading. I realize that I can reuse code, but I still need to list all
the combinations of types. Is there a way to sort of say "any numeric type"
rather than make a ton of overloads for each operator? Thanks.
numeric types). Because there are many possible combinations of parameters
for this due to all the different numeric types, and the code will be the
same for almost all of them (single, double, decimal, short, integer, long,
etc.), I was wondering if there is a more efficient way to do the
overloading. I realize that I can reuse code, but I still need to list all
the combinations of types. Is there a way to sort of say "any numeric type"
rather than make a ton of overloads for each operator? Thanks.