Unlike VB, C# has no exponentiation operator built into the language. You
have to use the Math class (Math.Pow).
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
C# Code Metrics: Quick metrics for C#
"Steve Kershaw" wrote:
> This is stupid!!!!
>
> I have looked everywhere (in books, google, online....) to find out how
> to raise a number to a power and I can't find it!!!
>
> For example:
>
> given x = 10
> y = x ^ 2;
> y would then be 100 (10 squared is 100).
>
> Why can't I find such a basic operation!?
>
> Steve
>
>