To calculate fractional power in C#, use the Math.Pow method.
The following sets 5 to the power 3.7 −
double res = Math.Pow(5, 3.7);
The following is the complete example showing how to calculate fractional power in C# −
Example
using System;
class Program {
static void Main() {
double res = Math.Pow(5, 3.7);
Console.WriteLine("Result = {0}", res);
Console.ReadLine();
}
}Output
Result = 385.646164200006