To the power of

Given two integers, write a method that returns first number raised to the power of second one.
Expected input and output
ToThePowerOf(-2, 3) → -8 ToThePowerOf(5, 5) → 3125
using System;

namespace CSharpExercises.Exercises.Loops
{
    class ToThePowerOfTask
    {
        static double ToThePowerOf(int b, int exp)
        {
            double result = 1;
            if (exp == 0)
            {
                return 1;
            }

            for (int i = 1; exp > 0 ? i <= exp : i <= exp * (-1); i++)
            {
                result *= b;
            }

            return exp > 0 ? result : 1 / result;
        }

        static void Main(string[] args)
        {
            Console.WriteLine(ToThePowerOf(10, 0)); // 1
            Console.WriteLine(ToThePowerOf(5, -2)); // 0.04
            Console.WriteLine(ToThePowerOf(8, -8)); // 5.96046447753906E-08
            Console.WriteLine(ToThePowerOf(0, 5));  // 0
        }
    }
}