Is there an exponent operator in C#?

Posted by Charlie on Stack Overflow See other posts from Stack Overflow or by Charlie
Published on 2010-06-14T01:31:36Z Indexed on 2010/06/14 1:42 UTC
Read the original article Hit count: 275

Filed under:
|
|

For example, does an operator exist to handle this?

float Result, Number1, Number2;

Number1 = 2;
Number2 = 2;

Result = Number1 (operator) Number2;

In the past the ^ operator has served as an exponential operator in other languages, but in C# it is a bit-wise operator.

Do I have to write a loop or include another namespace to handle exponential operations? If so, how do I handle exponential operations using non-integers?

© Stack Overflow or respective owner

Related posts about c#

Related posts about operators