Is there a way to overload exponents in C#? I know in some languages (can't name any off the top of my head), ^
is used for exponential functions, but in C++ and C#, ^
is the bitwise XOR operator, which can be overloaded, but this is not what I want to overload. I wan't to overload the power function or whatever
For example. I know I can do 2^x
with (1 << x)
. So, my second part, is there an exponential operator in C# or do I have to stick with System.Math.Pow(base, exp);