Hi,
What is the function/opperator to calculate a power with C#

I tryed

powerof = anumber ^ anothernumber;

and that clearly doesn't work (1^3 is 2, 2^3 is 1 etc.)

How do I do it???

I looked under Math. functions and there was nothing and I spent ages Googleing

Thanx,
Sam

Extra remark: ^ is the XOR operator, not the power of operator.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.